[Numpy-discussion] MaskedArray and the min, max, sum, prod Methods
Pierre GM
pgmdevlist at gmail.com
Fri Jan 4 10:01:02 EST 2008
On Thursday 03 January 2008 15:49:45 Alexander Michael wrote:
> Working with the new MaskedArray, I noticed the following differences
>
> with numpy.array behavior:
> >>> masked_array([1, 2, 3], mask=True).min()
>
> 2147483647
That's a bug, the result should be maskedarray.masked. Samething for max, of
course.
> >>> masked_array([1, 2, 3], mask=True).prod()
>
> masked_array(data = --,
> mask = True,
> fill_value=1e+020)
>
> >>> array([]).prod()
>
> 1.0
That's OK here, the result is maskedarray.masked. Ditto for sum
More information about the NumPy-Discussion
mailing list