Skip to content

[stats_examples] Replace np.sum(a * b) with a @ b#476

Merged
mmcky merged 4 commits intoQuantEcon:mainfrom
suda-yuga:suda-yuga-patch-5
Jul 21, 2025
Merged

[stats_examples] Replace np.sum(a * b) with a @ b#476
mmcky merged 4 commits intoQuantEcon:mainfrom
suda-yuga:suda-yuga-patch-5

Conversation

@suda-yuga
Copy link
Contributor

Replace np.sum(a * b) with a @ b
#463

Co-authored-by: Daisuke Oyama <Oyama.Daisuke@gmail.com>
@mmcky mmcky requested a review from HumphreyYang July 1, 2025 02:15

# mean
mean = np.sum(Benford_pmf * k)
mean = k @ Benford_pmf
Copy link
Contributor

Choose a reason for hiding this comment

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

@HumphreyYang just confirming this change in order of the matrices is OK?

Copy link
Member

Choose a reason for hiding this comment

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

Hi @mmcky,

Yes, I think both of them are 1-d arrays so either way is fine!

Copy link
Member

Choose a reason for hiding this comment

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

Hi @mmcky, I will fix the merge conflict now.

@HumphreyYang HumphreyYang changed the title [prob_matrix] Replace np.sum(a * b) with a @ b [stats_examples] Replace np.sum(a * b) with a @ b Jul 21, 2025
@mmcky
Copy link
Contributor

mmcky commented Jul 21, 2025

thanks @HumphreyYang for the merge conflict fix.

thanks @suda-yuga for this PR.

@mmcky mmcky merged commit 502ea87 into QuantEcon:main Jul 21, 2025
6 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.

4 participants