On Mon, Aug 31, 2015 at 10:31 AM, Antoine Pitrou <solip...@pitrou.net> wrote:
> 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.

I think this is going through the np.sign timedelta64 loop, and thus
is an unrelated issue? It does look like a bug though.

-n

-- 
Nathaniel J. Smith -- http://vorpus.org
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to