[Numpy-discussion] Re: linalg.svd returns fortran arrays, causes problems
Travis Oliphant
oliphant.travis at ieee.org
Mon Mar 20 19:51:05 CST 2006
Robert Kern wrote:
> I think this is a new bug, then.
>
> In [82]: reshape(numpy.array([[1,2,3,4,5,6,7,8,9,10],
> [11,12,13,14,15,16,17,18,19,20]], fortran = True), (2,5,2))
> Out[82]:
> array([[[ 1, 2],
> [ 3, 4],
> [ 5, 6],
> [ 7, 8],
> [ 9, 10]],
>
> [[11, 12],
> [13, 14],
> [15, 16],
> [17, 18],
> [19, 20]]])
>
> In [83]: reshape(numpy.array([[1,2,3,4,5,6,7,8,9,10],
> [11,12,13,14,15,16,17,18,19,20]], fortran = False), (2,5,2))
> Out[83]:
> array([[[ 1, 2],
> [ 3, 4],
> [ 5, 6],
> [ 7, 8],
> [ 9, 10]],
>
> [[11, 12],
> [13, 14],
> [15, 16],
> [17, 18],
> [19, 20]]])
>
>
Robert, can you test
numpy.array([[1,2,3,4,5,6,7,8,9,10],[11,12,13,14,15,16,17,18,19,20]], fortran = False).reshape(2,5,2)
numpy.array([[1,2,3,4,5,6,7,8,9,10],[11,12,13,14,15,16,17,18,19,20]], fortran = False).reshape(2,5,2)
please?
The reshape method has not changed since your version, but the reshape wrapper did change slightly, I believe. In a manner that could have caused this difference.
-Travis
More information about the Numpy-discussion
mailing list