Tue Jun 2 15:56:57 CDT 2009
I just wanted to give you a heads up that I came across a bug in
I have updated the corresponding review page (
http://projects.scipy.org/scipy/ticket/44 ) with the following
_chk_asarray does not respect the class of the input. If the input is
a subclass of numpy.ndarray _chk_asarray will transform it into an
ndarray. This can lead to undesirable consequences in functions that
call _chk_asarray (e.g., scipy.stats.nanmean).
>>> tst = matrix(range(4))
array([0., 1., 2., 3.])
matrix([[0., 1., 2., 3.]])
The problem is the call to np.asarray() which should only be made for
input that is not an ndarray instance. I just committed a
corresponding fix via SVN.
More information about the Scipy-dev