Re: [Numpy-discussion] "ValueError: total size of new array must be unchanged" only on Windows

2012-02-05 Thread Paolo
I solved using 'rb' instead of 'r' option in the open file task. Thank you very much. Il 05/02/2012 19:13, Warren Weckesser ha scritto: On Sun, Feb 5, 2012 at 12:06 PM, <mailto:josef.p...@gmail.com>> wrote: On Sun, Feb 5, 2012 at 12:52 PM, Paolo mail

Re: [Numpy-discussion] "ValueError: total size of new array must be unchanged" only on Windows

2012-02-05 Thread Paolo
How I can do this? Il 05/02/2012 18:47, josef.p...@gmail.com ha scritto: On Sun, Feb 5, 2012 at 12:39 PM, Paolo <mailto:p.zaff...@yahoo.it>> wrote: This is my code: matrix="".join(f.readlines()) my guess would be, that you have to strip the line endings \n

Re: [Numpy-discussion] "ValueError: total size of new array must be unchanged" only on Windows

2012-02-05 Thread Paolo
ivier Le 5 février 2012 11:16, Paolo Zaffino <mailto:p.zaff...@yahoo.it>> a écrit : Yes, I understand this but I don't know because on Linux and Mac it works well. If the matrix size is different it should be different indipendently from os type.

[Numpy-discussion] R: Re: "ValueError: total size of new array must be unchanged" only on Windows

2012-02-05 Thread Paolo Zaffino
Yes, I understand this but I don't know because on Linux and Mac it works well. If the matrix size is different it should be different indipendently from os type. Am I wrong? Thanks for your support! ___ NumPy-Discussion mailing list NumPy-Discussion@sc

[Numpy-discussion] "ValueError: total size of new array must be unchanged" only on Windows

2012-02-05 Thread Paolo
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

[Numpy-discussion] Numpy matrix and Blitz Matrix

2007-11-22 Thread Paolo Tenconi
Any suggestion or help would be very glad. Paolo #-- EXAMPLE CODE --- import numpy import scipy #Dot product with arrays (it works) x=numpy.array([[1,2,],[3,4]]) y=numpy.zeros((2,2)) scipy.weave.inline("""y=x*x;"&qu