diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2021-09-13 15:50:54 -0400 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2021-09-14 13:38:07 -0400 |
commit | 6ba48721e22622403a60b7f9d3ec5cae308ba3a9 (patch) | |
tree | b85b31d174fbcf7d6c7723eebfd0d3eabdc042b4 /numpy/array_api/_manipulation_functions.py | |
parent | e4f85b08c252b576f3c589cc1202f040c22d64f2 (diff) | |
download | numpy-6ba48721e22622403a60b7f9d3ec5cae308ba3a9.tar.gz |
BUG: ensure np.median does not drop subclass for NaN result.
Currently, np.median is almost completely safe for subclasses, except
if the result is NaN. In that case, it assumes the result is a scalar
and substitutes a NaN with the right dtype. This PR fixes that, since
subclasses like astropy's Quantity generally use array scalars to
preserve subclass information such as the unit.
Diffstat (limited to 'numpy/array_api/_manipulation_functions.py')
0 files changed, 0 insertions, 0 deletions