[SciPy-User] small error in numpy docs

Dan Lussier dtlussier@gmail....
Wed Oct 27 15:52:52 CDT 2010


I found a slight error in the numpy docs, and wasn't sure how to best report it:

It is at: http://docs.scipy.org/doc/numpy/reference/maskedarray.generic.html#unmasking-an-entry

The second code block under that heading should be:

#######################################

>>> x = ma.array([1, 2, 3], mask=[0, 0, 1], hard_mask=True)
>>> x
masked_array(data = [1 2 --],
             mask = [False False  True],
       fill_value = 999999)
>>> x[-1] = 5
>>> x
masked_array(data = [1 2 --],
             mask = [False False  True],
       fill_value = 999999)
>>> x.soften_mask()
>>> x[-1] = 5
>>> x
masked_array(data = [1 2 5],
             mask = [False False  False],
       fill_value = 999999)
>>> x.harden_mask()

#######################################

The error was after the second attempt to assign to x[-1].

Cheers,

Dan


More information about the SciPy-User mailing list