[Numpy-discussion] MaskedArray and the min, max, sum, prod Methods

Pierre GM pgmdevlist at gmail.com
Fri Jan 4 10:42:54 EST 2008


On Friday 04 January 2008 10:27:32 Alexander Michael wrote:

> Hmm. I liked the base ndarray behavior as it makes a lot of sense to
> me and provides an easy default that avoids needing to check the
> result between steps. 

I must admit I have troubles conceptualizing the product of an empty array, so 
the ndarray behavior is a bit puzzling to me.

> Does MaskedArray do this to be compatible 
> with the original ma, or is there a theoretically good reason for it
> that I am missing?

Yes for the part. For the second, well, I think there's a difference between a 
maskedarray of a given size, where all values are masked, and an empty array. 
Any operation on a fully-masked array should result in maskedarray.masked.



More information about the NumPy-Discussion mailing list