summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_elementwise_functions.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-04-15 15:31:33 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-04-15 15:31:33 -0600
commit9af1cc60edd4fdbb7e9c18d124e639a44ce420c7 (patch)
tree458fbf2cbc465f7d5109f4fee9dc1109802ba0d2 /numpy/_array_api/_elementwise_functions.py
parent844fcd39692da676a7204c6cc7feea428ba49609 (diff)
downloadnumpy-9af1cc60edd4fdbb7e9c18d124e639a44ce420c7.tar.gz
Use dtype objects instead of classes in the array API
The array API does not require any methods or behaviors on dtype objects, other than that they be literals that can be compared for equality and passed to dtype keywords in functions. Since dtype objects are already used by the dtype attribute of ndarray, this makes it consistent, so that func(dtype=<dtype>).dtype will give exactly <dtype> back, which will be the same thing as numpy._array_api.<dtype>. This also fixes an issue in the array API test suite due to the fact that dtype classes and objects are not equal as dictionary keys.
Diffstat (limited to 'numpy/_array_api/_elementwise_functions.py')
0 files changed, 0 insertions, 0 deletions