Closed
Description
NumPy returns Python integers in that particular case, and I am not sure I feel it's worth changing it.
The reason is, that if a place only uses axis=None
(the default), the result of intp
vs. Python integer, changes promotion rules when combined with e.g. float32.
Now, I don't think this will happen a lot, but for count_nonzeros
I am not sure I don't think this isn't more user-friendly and an OK and very small inconsistency.
NumPy itself will be fine (because we never only use axis=None
), skimage
I saw one function which would return float64
rather than a Python float.
(Maybe one of those things where, I feel forcing intp
return is great, but I am not sure changing NumPy main namespace for it is worthwhile.)
Metadata
Metadata
Assignees
Labels
Changes to existing functions or objects in the API.Changes to existing functions or objects in the API.Needs further discussion.Needs further discussion.