[Numpy-discussion] Unexpected MaskedArray behavior

Pierre GM pgmdevlist@gmail....
Wed Dec 17 11:45:14 CST 2008

On Dec 17, 2008, at 12:13 PM, Jim Vickroy wrote:
> Sorry for being dense about this, but I really do not understand why  
> masked values should not be trusted.  If I apply a procedure to an  
> array with elements designated as untouchable, I would expect that  
> contract to be honored.  What am I missing here?
> Thanks for your patience!
> -- jv

Everything depends on your interpretation of masked data.  
Traditionally, masked data indicate invalid data, whatever the cause  
of the invalidity. Operations involving invalid data yield invalid  
data, hence the presence of a mask on the result. However, the value  
underneath the mask is still invalid, hence the statement "don't trust  
masked values".
Interpreting a mask as a way to prevent some elements of an array to  
be processed (designating them as untouchable) is a bit of a stretch.  
Nevertheless, I agree that this behavior is not intuitive, so I'll  
check what I can do.

More information about the Numpy-discussion mailing list