[Numpy-discussion] Inconsistent type name formatting.

6 views
Skip to first unread message

Charles R Harris

unread,
Mar 24, 2012, 4:17:07 PM3/24/12
to numpy-discussion
Example:

In [40]: array([1, 2], dtype('>l')).dtype
Out[40]: dtype('>i8')

In [41]: array([1, 2], dtype('<l')).dtype
Out[41]: dtype('int64')

In [42]: array([1, 2], dtype('>q')).dtype
Out[42]: dtype('>i8')

In [43]: array([1, 2], dtype('<q')).dtype
Out[43]: dtype('int64')

In [44]: array([1, 2], dtype('>M8[D]')).dtype
Out[44]: dtype('>M8[D]')

In [45]: array([1, 2], dtype('<M8[D]')).dtype
Out[45]: dtype('<M8[D]')

I rather like the '>i8' form with '<' if appropriate, although it's probably a bit late to do anything about it. The datetime requires a patch to generate the swapped form. Long term, it might be good to strive for consistency. Thoughts?

Chuck.
Reply all
Reply to author
Forward
0 new messages