On Mon, 31 Aug 2015 10:23:10 -0700 Stephan Hoyer <sho...@gmail.com> wrote: > > My inclination is that return NaN would be the appropriate choice. It's > certainly consistent with the behavior for float dtypes -- my expectation > for object dtype behavior is that it works exactly like applying the > np.sign ufunc to each element of the array individually. > > On the other hand, I suppose there are other ways in which an object can > fail all those comparisons (e.g., NaT?), so I suppose we could return None.
Currently: >>> np.sign(np.timedelta64('nat')) numpy.timedelta64(-1) ... probably because NaT is -2**63 under the hood. But in this case returning NaT would sound better. Regards Antoine. _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion