diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2020-01-29 12:51:55 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2020-01-30 00:08:53 +0000 |
commit | 7389163da161ffbcff59596a4b78089f1833fd7d (patch) | |
tree | 0c30d2dc29305b11c62271f96f30d7d4791f7db7 /numpy/array_api/_array_object.py | |
parent | df1347dba08a7c67a38bd1dfcd180342e579195f (diff) | |
download | numpy-7389163da161ffbcff59596a4b78089f1833fd7d.tar.gz |
MAINT: Simplify scalar __new__ some more
The comment about base-classes doing conversions was incorrect - these always return objects of the right type
The only way the `Py_TYPE(robj) == type` can fail is if the type cannot survive round-tripping through `PyArray_DescrFromType` and `PyArray_FromAny`.
The former applies to subclasses of numpy types, while the latter is probably caused by a bug elsewhere.
This allows the `goto` to be eliminated, which means all the declarations can be pushed down.
Diffstat (limited to 'numpy/array_api/_array_object.py')
0 files changed, 0 insertions, 0 deletions