diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2022-06-15 18:44:15 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-15 17:44:15 -0700 |
commit | 70026c4dde47d89d6a7a4916bfac045e714a5b4f (patch) | |
tree | d4ca78d0cc6ec9ff5ac934a967f56e67365b3346 /numpy/array_api/_array_object.py | |
parent | 2d4452477245f1332b607c2899a12f6e398a8675 (diff) | |
download | numpy-70026c4dde47d89d6a7a4916bfac045e714a5b4f.tar.gz |
MAINT: Fix computation of numpy.array_api.linalg.vector_norm (#21084)
* Fix computation of numpy.array_api.linalg.vector_norm
Various pieces were incorrect due to a lack of complete coverage of this
function in the array API test suite.
* Fix the output dtype nonstandard vector norm()
Previously it would always give float64 because an internal calculation
involved a NumPy scalar and a Python float. The fix is to use a 0-D array
instead of a NumPy scalar so that it type promotes with the float correctly.
Fixes #21083
I don't have a test for this yet because I'm unclear how exactly to test it.
* Clean up the numpy.array_api.linalg.vector_norm code a little bit
Diffstat (limited to 'numpy/array_api/_array_object.py')
0 files changed, 0 insertions, 0 deletions