Re: [Numpy-discussion] timedelta64 remainder behavior with div by 0

2019-01-08 Thread Tyler Reddy
Looks like we're still on 1.16.0rc2 -- released 4 days ago. On Tue, 8 Jan 2019 at 10:28, Eric Wieser wrote: > If we consider it a bug, we could patch it in 1.16.1 (or are we still > waiting on 1.16.0?), which would minimize the backwards compatibility cost. > > Eric > > On Tue, 8 Jan 2019 at 10:

Re: [Numpy-discussion] timedelta64 remainder behavior with div by 0

2019-01-08 Thread Eric Wieser
If we consider it a bug, we could patch it in 1.16.1 (or are we still waiting on 1.16.0?), which would minimize the backwards compatibility cost. Eric On Tue, 8 Jan 2019 at 10:05 Stefan van der Walt wrote: > On Tue, 08 Jan 2019 09:57:03 -0800, Tyler Reddy wrote: > > np.timedelta64(5) % np.timed

Re: [Numpy-discussion] timedelta64 remainder behavior with div by 0

2019-01-08 Thread Stefan van der Walt
On Tue, 08 Jan 2019 09:57:03 -0800, Tyler Reddy wrote: > np.timedelta64(5) % np.timedelta64(0) -> numpy.timedelta64(0) > > In contrast, np.float64(1) % np.float64(0) -> nan > > There's a suggestion that we should switch to returning NaT for the > timedelta64 case for consistency, and that this pr

Re: [Numpy-discussion] timedelta64 remainder behavior with div by 0

2019-01-08 Thread Hameer Abbasi
I would say this is desirable behaviour, but I’m still +0.8 on this for backward compatibility reasons. I doubt anyone would build code that relies on this though… They would almost certainly check for the zero in the denominator rather than the return value. Best Regards, Hameer Abbasi > On T