-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Open
Labels
component: numpy.datetime64(and timedelta64)(and timedelta64)
Description
The current behaviour of sign on timedelta64 objects is somewhat surprising:
In [64]: sign(np.timedelta64(3, 'm')) == sign(np.timedelta64(3, 's'))
Out[64]: False
I'm not sure if the return type for the sign of a timedelta64 should even be a timedelta64 or or simply numerical. Of course, normally sign(x) returns a result of the same dtype as x, but for any numerical data we have uint8(1) == int8(1) == float32(1) == .... etc. I'm not sure what the best return value would be for the sign of a timedelta64, but I think it would be desirable if their signs compared equal.
Metadata
Metadata
Assignees
Labels
component: numpy.datetime64(and timedelta64)(and timedelta64)