[Numpy-discussion] Properties of ma.masked singleton

Alexander Belopolsky alexander.belopolsky at gmail.com
Fri Jan 6 21:47:27 EST 2006


On 1/6/06, Paul F. Dubois <paul at pfdubois.com> wrote:
> ...
> I redid ma in a bit of a hurry and didn't pay any attention to the
> issues you raise as to len(masked), which I agree should be 1.

I did not suggest that len(masked) should be 1. It was 1 in Numeric MA
because scallars had len 1 in Numeric, but in numpy len(scalar) is an
error consistent with scalar.shape==() and len(x) == x.shape[0]. My
proposal was not to return masked singleton from x[i] and return
ma.array(x.data[i],mask=x.mask[i]), this will result in len(x[i])
being an error for rank 1 x and integer i, which would be consistent
with numpy.

-- sasha




More information about the NumPy-Discussion mailing list