[Numpy-discussion] NA masks for NumPy are ready to test

Ralf Gommers ralf.gommers@googlemail....
Fri Aug 19 15:04:15 CDT 2011


On Fri, Aug 19, 2011 at 9:15 PM, Mark Wiebe <mwwiebe@gmail.com> wrote:

> On Fri, Aug 19, 2011 at 11:37 AM, Bruce Southey <bsouthey@gmail.com>wrote:
>
>> Hi,
>> Just some immediate minor observations that are really about trying to
>> be consistent:
>>
>> 1) Could you keep the display of the NA dtype be the same as the array?
>> For example, NA dtype is displayed as '<f8' but should be displayed as
>> 'float64' as that is the array dtype.
>>  >>> a=np.array([[1,2,3,np.NA], [3,4,np.nan,5]])
>> >>> a
>> array([[  1.,   2.,   3., NA],
>>       [  3.,   4.,  nan,   5.]])
>> >>> a.dtype
>> dtype('float64')
>> >>> a.sum()
>> NA(dtype='<f8')
>>
>
> I suppose I can do it that way, sure. I think it would be good to change
> the 'float64' into '<float64' at some point, so it's a more portable repr.
>
>
I don't think that looks better. It would also screws up people's doctests
again.

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110819/91be124f/attachment.html 


More information about the NumPy-Discussion mailing list