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

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Oct 9 21:14:53 EDT 2011


Paolo Zaffino wrote:

> Hello,
> I wrote a function that works on a numpy matrix and it works fine on
> Mac OS and GNU/Linux (I didn't test it on python 3)
> Now I have a problem with numpy: the same python file doesn't work on
> Windows (Windows xp, python 2.7 and numpy 2.6.1).
> I get this error:
> 
> matrix=matrix.reshape(a, b, c)
> ValueError: total size of new array must be unchanged
> 
> Why? Do anyone have an idea about this?
> Thank you very much.

Please give sample values for matrix, a, b and c that demonstrate the issue.

What version of Python and numpy are you using on Mac and Linux?



-- 
Steven




More information about the Python-list mailing list