Skip to content

[scalar_dynamic] Update editorial suggestions #430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 28, 2024
Merged

Conversation

longye-tian
Copy link
Collaborator

Dear John @jstac,

This pull request updates the editorial suggestion in #426. The details are shown as follows.

(Delete %matplotlib inline)

  • If $n$ is an integer -> if $n$ is a positive integer
  • Change the duplicated heading for 22.2.3. Dynamic systems.
  • Capitalize the first letter in the section headings.
  • where $a, b$ are fixed constants -> where $a, b$ are constants. Sometimes they are referred to as parameters
  • $t \geq 0$ -> t = 0, 1, 2
  • Arbitrary $t$ to non-negative integer $t$
  • For example, recall how we previously studied -> For example, in the simple Solow-Swan growth model.
  • $k$ is capital stock -> $k$ is capital stock per capita
  • a fixed dynamic system consisting -> a dynamic system consisting
  • Use commas instead of full stops below the sentence: "For example, for the linear model $x_{t+1} = a x_t + b$, you can use the definition to check that"
  • 45 degree -> 45-degree
  • Add labels to axis in plot45 function x_t and x_{t+1}
  • Put the global variables into function $g$
  • Missing full stop in 'study the trajectories'
  • Change the Solow model to Solow-Swan model

Best ❤️
Longye

This updates the editorial suggestion in #426

(Delete %matplotlib inline)

- If $n$ is an integer -> if $n$ is a positive integer
- Change the duplicated heading for 22.2.3. Dynamic systems.
- Capitalize the first letter in the section headings.
- where $a, b$ are fixed constants -> where $a, b$ are constants. Sometimes they are referred to as parameters
- $t \geq 0$ -> t = 0, 1, 2
- Arbitrary $t$ to non-negative integer $t$
- For example, recall how we [previously studied](https://python-programming.quantecon.org/python_oop.html#example-the-solow-growth-model) -> For example, in the simple Solow-Swan growth model.
- $k$ is capital stock -> $k$ is  capital stock per capita
- a fixed dynamic system consisting -> a dynamic system consisting
- Use commas instead of full stops below the sentence: "For example, for the linear model $x_{t+1} = a x_t + b$, you can use the definition to check that"
- 45 degree -> 45-degree

## Code
- Add labels to axis in `plot45` function  x_t and x_{t+1}
- Put the global variables into function $g$
- Missing full stop in 'study the trajectories'

- Change the Solow model to Solow-Swan model
Copy link

netlify bot commented Apr 22, 2024

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 516c2af
🔍 Latest deploy log https://app.netlify.com/sites/taupe-gaufre-c4e660/deploys/662e0209d937740008116653
😎 Deploy Preview https://deploy-preview-430--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jstac
Copy link
Contributor

jstac commented Apr 22, 2024

Thanks @longye-tian, much appreciated! This all looks good to me.

@mmcky , could you please guide this through the merge process and close any relevant issues?

@mmcky
Copy link
Contributor

mmcky commented Apr 26, 2024

thanks @longye-tian this code cell is not executing in scalar-dynam

------------------
xmin, xmax = 0, 4  # Suitable plotting region.

plot45(g, xmin, xmax, 0, num_arrows=0)
------------------

due to a key error

KeyError�'t+1'

@@ -340,6 +335,8 @@ def plot45(g, xmin, xmax, x0, num_arrows=6, var='x'):
fig, ax = subplots()
ax.set_xlim(xmin, xmax)
ax.set_ylim(xmin, xmax)
ax.set_xlabel(r'${}_t$'.format(var), fontsize=14)
ax.set_ylabel(r'${}_{t+1}$'.format(var), fontsize=14)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@longye-tian this is causing the execution error. It almost seems like python is trying to use t+1 as a variable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mmcky, yes. I fix this by changing the format. I think now we can run it as we want.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing this out!

fix y_label format problem in plot45
Copy link

github-actions bot commented Apr 26, 2024

@github-actions github-actions bot temporarily deployed to pull request April 26, 2024 02:05 Inactive
@mmcky
Copy link
Contributor

mmcky commented Apr 26, 2024

@longye-tian do you have any time to work on these comments?

#426 (comment)

@longye-tian
Copy link
Collaborator Author

longye-tian commented Apr 26, 2024

@longye-tian do you have any time to work on these comments?

#426 (comment)

Hi @mmcky , I can work on these comments as well :))

I think the other comments in #426 require a separate pull request. I will create a new pull request for other comments.

Best,
Longye

@mmcky
Copy link
Contributor

mmcky commented Apr 26, 2024

thanks @longye-tian -- @jstac this PR is ready for review.

@github-actions github-actions bot temporarily deployed to pull request April 28, 2024 08:08 Inactive
@jstac
Copy link
Contributor

jstac commented Apr 28, 2024

Many thanks @longye-tian , much appreciated. Merging.

@jstac jstac merged commit 3703575 into main Apr 28, 2024
@jstac jstac deleted the scalar_dynamic-suggestion branch April 28, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants