forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
df1347d
commit 7389163
Showing
1 changed file
with
42 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters