[Numpy-discussion] Type specific sorts: objects, structured arrays, and all that.

Benjamin Root ben.root@ou....
Tue Jul 10 07:30:44 CDT 2012

On Tue, Jul 10, 2012 at 3:37 AM, Robert Kern <robert.kern@gmail.com> wrote:

> On Tue, Jul 10, 2012 at 4:32 AM, Charles R Harris
> <charlesr.harris@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:
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120710/02c292e1/attachment.html 

More information about the NumPy-Discussion mailing list