Closed
Description
Currently, the specifications for computing the min
and max
do not state what should happen in the event of signed zeros. E.g.,
> x = xp.asarray([0.0, -0.0])
> xp.min(x)
???
NumPy returns -0.0
for the above, which is likely the desired behavior.
In [1]: np.min([0.0, -0.0])
Out[1]: -0.0
In [2]: np.min([-0.0, 0.0] )
Out[2]: -0.0
The ordering of signed zeros does not appear to have been discussed in #10 or in #17 which were opened during initial development of the Array API Standard.
This issue has relevance for #667, as, if signed zeros are ordered when computing the minimum and maximum, xp.where
is not a simple replacement for element-wise minimum
and maximum
APIs.
Metadata
Metadata
Assignees
Labels
No labels