diff options
author | M. Eric Irrgang <ericirrgang@gmail.com> | 2022-07-16 12:47:07 -0500 |
---|---|---|
committer | M. Eric Irrgang <ericirrgang@gmail.com> | 2022-07-16 13:23:52 -0500 |
commit | 45357de4cf83340bd05d279673f68a7fd42b2308 (patch) | |
tree | 0598bc379a1e32b870b504fe77ab080fffbba451 /numpy/array_api/_array_object.py | |
parent | bdec32181605c8179fd79624d14c1cf019de75af (diff) | |
download | numpy-45357de4cf83340bd05d279673f68a7fd42b2308.tar.gz |
BUG: Distinguish exact vs. equivalent dtype for C type aliases.
For `asarray` and for the `dtype` equality operator,
equivalent dtype aliases were considered exact matches.
This change ensures that the returned array has a descriptor
that exactly matches the requested dtype.
Note: Intended behavior of `np.dtype('i') == np.dtype('l')`
is to test compatibility, not identity. This change does not
affect the behavior of `PyArray_EquivTypes()`, and the
`__eq__` operator for `dtype` continues to map to
`PyArray_EquivTypes()`.
Fixes #1468.
Diffstat (limited to 'numpy/array_api/_array_object.py')
0 files changed, 0 insertions, 0 deletions