[Numpy-discussion] Summing an array with dtype=object
pgmdevlist at gmail.com
Mon Nov 16 00:11:43 EST 2009
An issue was recently raised about summing a MaskedArray with a np.object dtype. Turns out that the problem is numpy based:
Let's sum using integers
>>> type(np.sum([1,2,3], dtype=np.int32))
Now, with a np.object dtype:
And we no longer have a np.object, but a regular Python int. Which, unfortunately for MaskedArray, does not have a view object (hence the bug).
Is it the expected behavior ?
More information about the NumPy-Discussion