[NUMPY] "ValueError: total size of new array must be unchanged" just on Windows

MRAB python at mrabarnett.plus.com
Fri Oct 14 17:54:27 EDT 2011


On 14/10/2011 21:55, Paolo Zaffino wrote:
> Nobody can help me?
>
Others have already tried to help you.

What is the shape and size of 'matrix' before, and what are the values
of 'a', 'b' and 'c'?

Print them in the ones which work (GNU/Linux and Mac OS) and the one
which doesn't (Windows). Do they print the same values?

Do not assume that they are the same. Print them to make sure.
>
> 2011/10/12 Paolo Zaffino <zaffino.p at gmail.com <mailto:zaffino.p at gmail.com>>
>
>     I wrote a function thaht works on a 3D matrix.
>     As first thing I have an array and I want reshape it into a 3D
>     matrix (for further manipulations).
>     For this reason I wrote in a row:
>
>     matrix=matrix.reshape(a, b, c).T
>
>     It work fine on GNU/Linux and Mac OS but not on Windows.
>     In Windows I get this error:
>
>     matrix=matrix.reshape(a, b, c).T
>
>     ValueError: total size of new array must be unchanged
>
>     Thank you.
>
>     2011/10/11 David Robinow <drobinow at gmail.com
>     <mailto:drobinow at gmail.com>>
>
>         2011/10/11 Paolo Zaffino <zaffino.p at gmail.com
>         <mailto:zaffino.p at gmail.com>>:
>          > Nobody can help me?
>           Nope, not unless you post some code. Your problem description
>         is too vague.
>



More information about the Python-list mailing list