summaryrefslogtreecommitdiff
path: root/numpy/array_api/_manipulation_functions.py
diff options
context:
space:
mode:
authorMarten van Kerkwijk <mhvk@astro.utoronto.ca>2021-09-13 15:50:54 -0400
committerMarten van Kerkwijk <mhvk@astro.utoronto.ca>2021-09-14 13:38:07 -0400
commit6ba48721e22622403a60b7f9d3ec5cae308ba3a9 (patch)
treeb85b31d174fbcf7d6c7723eebfd0d3eabdc042b4 /numpy/array_api/_manipulation_functions.py
parente4f85b08c252b576f3c589cc1202f040c22d64f2 (diff)
downloadnumpy-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