[Numpy-discussion] feedback request: proposal to add masks to the core ndarray

Gael Varoquaux gael.varoquaux at normalesup.org
Sat Jun 25 08:00:44 EDT 2011


On Sat, Jun 25, 2011 at 01:02:07AM +0100, Matthew Brett wrote:
> I'm personally worried that the memory overhead of array.masks will
> make many of us tend to avoid them.  I work with images that can
> easily get large enough that I would not want an array-items size byte
> array added to my storage.

I work with the same kind of data ( :D ). 

The way we manipulate our data, in my lab, is, to represent 3D data with
a mask to use a 1D array and a corresponding 3D mask. It reduces the
memory footprint, to the cost of loosing the 3D shape of the data.

I am raising this because it is an option that has not been suggested so
far. I am not saying that it should be the option used to implement mask
arrays, I am just saying that there are many different ways of doing it,
and I don't think that there is a one-size-fits-all solution.

I tend to feel like Wes: good building block to easily implement our own
solutions is what we want.

My 2 cents,

Gael



More information about the NumPy-Discussion mailing list