| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
OBJECT_vdot left the output as NULL when n == 0, which PyArray_Return turned into None. Use the same empty-product zero as OBJECT_dotc (numpygh-31033). Fixes numpy#31735
|
You ignored the PR template, so I'm going to assume that this PR has been made with agentic AI. This violates our AI policy; we prefer to talk to humans. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
np.vdot of a zero-length object array returned None instead of a zero-like result. OBJECT_vdot never wrote an identity value when n == 0, so the output pointer stayed NULL and PyArray_Return turned that into None.
This is the same empty-product case that np.vecdot hit in gh-31019. The fix matches gh-31033: store 0 when the contracted axis has length 0.
vdot flattens, so all of these now return the scalar 0:
Fixes #31735