diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-02-21 16:18:54 -0600 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-05-09 17:13:13 +0200 |
commit | 9de1ca82f835ce41c027af0f68ecdf4015809cb6 (patch) | |
tree | fec59614af178fd71e7773699b7663d176eb90f4 /numpy/array_api/_statistical_functions.py | |
parent | f376d23acc05dcebc4eeb501073b5e2a50f0af4f (diff) | |
download | numpy-9de1ca82f835ce41c027af0f68ecdf4015809cb6.tar.gz |
BUG,MAINT: Never use negative offset and tighten promote-types
Negative offsets in structured dtypes give indirect access outside
of the original data in principle, thus we should always reject
them (this is as of now practically unused in NumPy).
Further, `np.result_type` and `np.promote_types` should behave
the same as canonicalization for twice the same input (at least
mostly, metadata is a rare exception).
This was not the case, because promote-types had a fast path that
would return the wrong thing for structured dtypes.
Thus, reject them from the fast-path, and limit it to builtin types
for now.
Diffstat (limited to 'numpy/array_api/_statistical_functions.py')
0 files changed, 0 insertions, 0 deletions