On Tue, Jul 10, 2012 at 3:37 AM, Robert Kern <robert.k...@gmail.com> wrote:
> On Tue, Jul 10, 2012 at 4:32 AM, Charles R Harris > <charlesr.har...@gmail.com> wrote: > > Hi All, > > > > I've been adding type specific sorts for object and structured arrays. It > > seems that datetime64 and timedelta64 are also not supported. Is there > any > > reason why those types should not be sorted as int64? > > You need special handling for NaTs to be consistent with how we deal > with NaNs in floats. > > Not sure if this is an issue or not, but different datetime64 objects can be set for different units: http://docs.scipy.org/doc/numpy/reference/arrays.datetime.html#datetime-units. A straight-out comparison of the values as int64 would likely drop the units, correct? On second thought, though, I guess all datetime64's in a numpy array would all have the same units, so it shouldn't matter, right? Just thinking aloud. Ben Root
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion