On 2021/12/28 10:54 AM, Lev Maximov wrote:
On Wed, Dec 29, 2021 at 12:45 AM Eric Firing <efir...@hawaii.edu <mailto:efir...@hawaii.edu>> wrote:

    On 2021/12/27 10:09 PM, Lev Maximov wrote:
     > Btw, does it make sense to include the masked arrays? I know
    Pandas uses
     > something
     > like a masked array for representing null values in the integer
    columns.
     > Does anyone use
     > NumPy masked arrays nowadays?
     >

    Yes, numpy masked arrays are very much in use, but a masked array is a
    subclass of ndarray, not a different data type.

In pandas it is a different data type ('Int64' vs 'int64'), so it makes perfect sense for me to mention it in this article provided I missed it in the main Numpy Illustrated one. I didn't have a chance to use them on my own and I've heard from some people that they don't use the masked array, for some reason, too. Do you know if Pandas uses ma internally or they have their own implementation?

Pandas has some support for importing numpy masked arrays, but internally it uses flag values rather than the parallel mask array as in a numpy MaskedArray. A DataFrame initialized from a MaskedArray is exported using the ".to_numpy" method as a plain ndarray, not a MaskedArray.

Eric


Thanks and regards,
Lev

_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: efir...@hawaii.edu

_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to