FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

BUG: Fix `np.vecdot` on empty object vectors returning None by aadya940 · Pull Request #31033 · numpy/numpy · GitHub

/ numpy Public

BUG: Fix np.vecdot on empty object vectors returning None - #31033

Merged
seberg merged 2 commits into
numpy:mainfrom
aadya940:vecdot-fix
Mar 19, 2026
Merged

BUG: Fix np.vecdot on empty object vectors returning None#31033
seberg merged 2 commits into
numpy:mainfrom
aadya940:vecdot-fix

Conversation

Copy link
Copy Markdown
Contributor

They should be returning zero instead.
Fixes #31019

seberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, the fix looks good and test should be good enough as well. I checked that a.dot(a) does return 0 (it takes a different approach, as it fills the result with zero ahead of time, assuming that is OK). Also matmul() returns zero already.

seberg commented Mar 19, 2026

Copy link
Copy Markdown
Member

Wheel builder / Build wheel cp312-macosx_x86_64-openblas (pull_request)Failing after 4m

Failed but unrelated.

seberg merged commit 5033aa9 into numpy:main Mar 19, 2026
78 of 79 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

BUG: vecdot of object arrays along zero-length slice is None

2 participants


Back | FazBrowse Home | New Git URL