You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: In numpy.array_api, divide and pow related functions/methods do not accept integer arrays #20752
The Array API initially only allowed floating arrays and Python scalars for these functions, but has since allowed all numeric arrays/Python scalars. They currently do work for integer Python scalars, but are restricted from using integer arrays.
Power functions: xp.pow(), x.__pow()__ and x.__ipow()__ Divide functions: xp.divide(), x.__truediv__() and x.__itruediv__()
Note scalar scenarios can still fail as the left argument could be an integer array.
Will try submitting a patch for this tomorrow. Not sure if maintainers would want to backport things until the 2021 spec is actually finalised, or if at all.
Activity
honno commentedon Jan 6, 2022
Will try submitting a patch for this tomorrow. Not sure if maintainers would want to backport things until the 2021 spec is actually finalised, or if at all.
honno commentedon Jan 7, 2022
Floating arrays should be okay as-is if data-apis/array-api#362 passes.