Skip to content

Conversation

@suda-yuga
Copy link
Contributor

Replace np.sum(a * b) and jnp.sum(a * b) with a @ b
QuantEcon/lecture-python.myst#463

# Compute the weighted sums for all t
weighted_sums = jnp.array(
[jnp.sum(λ_powers[:T-t] * μ[t:T]) for t in range(T)])
Copy link
Contributor

Choose a reason for hiding this comment

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

@HumphreyYang should we do this for jnp.sum as well as np.sum?

Copy link
Member

Choose a reason for hiding this comment

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

Many thanks @mmcky, I think it's fine because they behave similarly.

I will do another pass over every lecture once the preview PR is opened!

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks @HumphreyYang this is building now
#219

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll merge this in and then update #219

@mmcky mmcky merged commit 4d02fd3 into QuantEcon:main Aug 5, 2025
5 checks passed
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