[Numpy-discussion] Matrix vs array in ma.minimum

David Cournapeau cournape at gmail.com
Thu Jan 14 04:53:16 EST 2010


Hi,

I encountered a problem in matlab which boils down to a surprising
behavior of np.ma.minimum:

x = np.random.randn(2, 3)
mx = np.matrix(x)

np.ma.minimum(x) # smallest item of x
ret = np.ma.minimum(mx) # flattened version of mx, i.e.  ret == mx.flatten()

Is this expected ?

cheers,

David



More information about the NumPy-Discussion mailing list