Skip to content

Conversation

@jstac
Copy link
Contributor

@jstac jstac commented Aug 2, 2025

Switches from namedtuple to class(NamedTuple) for nicer, cleaner syntax.

Adds typing.

Simplifies the fori_loop discussion by removing the option of generating all shocks at once (which doesn't help much and requires more memory).

The coding style changes can be used as a model for updates to other lectures.

@netlify
Copy link

netlify bot commented Aug 2, 2025

Deploy Preview for incomparable-parfait-2417f8 ready!

Name Link
🔨 Latest commit 5b79b3e
🔍 Latest deploy log https://app.netlify.com/projects/incomparable-parfait-2417f8/deploys/688e0f2f6edca30008486c76
😎 Deploy Preview https://deploy-preview-224--incomparable-parfait-2417f8.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 project configuration.

@mmcky
Copy link
Contributor

mmcky commented Aug 2, 2025

The build is failing as it requires quantecon package to be installed.

ModuleNotFoundError�[0m: No module named 'quantecon'

@jstac I have just added this into this PR.

@github-actions
Copy link

github-actions bot commented Aug 2, 2025

@github-actions github-actions bot temporarily deployed to pull request August 2, 2025 07:12 Inactive
@github-actions github-actions bot temporarily deployed to pull request August 2, 2025 07:14 Inactive
@jstac
Copy link
Contributor Author

jstac commented Aug 2, 2025

Thanks @mmcky .

Is the numba warning after the imports caused by QE? We are using tic and toc. One quick work-around would be from time import time -- @HumphreyYang knows the style we normally use.

Should we suppress output after the pip install?

In addition to what's included in base Anaconda, we need to install the following packages

```{code-cell} ipython3
!pip install quantecon
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
!pip install quantecon
:tags: [hide-output]
!pip install quantecon

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks @jstac good call. I can take a look tomorrow at the numba warning 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mmcky :-)

@jstac
Copy link
Contributor Author

jstac commented Aug 2, 2025

Is the numba warning after the imports caused by QE?

I guess that's something we'll need to get to the bottom of as well 😬

@mmcky
Copy link
Contributor

mmcky commented Aug 2, 2025

Is the numba warning after the imports caused by QE?

I guess that's something we'll need to get to the bottom of as well 😬

@jstac we had fixed this issue prior. Might be just jax environment. Will check.

@HumphreyYang
Copy link
Member

HumphreyYang commented Aug 2, 2025

Many thanks @jstac and @mmcky,

I think the warning is related to the version of the package tbb (see here) and is caused by numba upstream.

I just pushed a commit following @jstac's suggestion:

One quick work-around would be from time import time

@github-actions github-actions bot temporarily deployed to pull request August 2, 2025 13:21 Inactive
@github-actions github-actions bot temporarily deployed to pull request August 2, 2025 13:24 Inactive
@jstac
Copy link
Contributor Author

jstac commented Aug 3, 2025

Thanks @HumphreyYang !

This is looking good. Green light from me.

@HumphreyYang HumphreyYang merged commit a5f732a into main Aug 3, 2025
7 checks passed
@HumphreyYang HumphreyYang deleted the inv_update branch August 3, 2025 03:31
@HumphreyYang
Copy link
Member

Many thanks @jstac for confirming!

@mmcky mmcky changed the title Updates to inventory lecture [inventory_dynamics] Code updates to inventory lecture Aug 4, 2025
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.

4 participants