array_multiply != the multiply ufunc #3503
Labels
15 - Discussion
component: numpy._core
Project
Possible project, may require specific skills and long commitment
This issue is a continuation of the disussion with @seberg in #3501, along with #3502:
Lots of places (such as 1, 2) use
PyArray_Type->tp_as_number->nb_multiply
to call themultiply
ufunc (etc.). Because of__array_priority__
, the semantics ofnb_multiply
are no longer the same as the ufunc. Specifically,nb_multiply
is required to to returnNotImplemented
in cases of priority inversion, whereas the ufunc has a job to do and just needs to do it, without asking questions about priorities.EDIT (seberg): This is still the case and probably cause of a few bugs (I am very sure reading an issue recently). It shouldn't be hard to fix, we have the
nb_ops
or mapping that is used for the array object: That needs to used throughout forscalartypes.c.src
andscalarmath.c.src
would do so indirectly then, although directly might solve additional unnecessary dances.The text was updated successfully, but these errors were encountered: