[SciPy-dev] matrix and ravel()
Fernando.Perez at colorado.edu
Tue Oct 11 20:26:36 CDT 2005
Robert Kern wrote:
> In : A = array([[1,2],[3,4]])
> In : B = mat(A)
> In : ravel(A)
> Out: array([1, 2, 3, 4])
> In : ravel(B)
> Out: matrix([[1, 2, 3, 4]])
> This appears to be a side effect of the new __array_finalize__ magic.
> I'm not sure that it's desirable. I'm also not sure that it's desirable
> to change it.
Well, at least I hope it gets changed, or a lot of code which expects ravel to
produce a flat, one-d array will blow to pieces.
More information about the Scipy-dev