Re: [Numpy-discussion] Download page still points to SVN

2012-02-05 Thread Scott Sinclair
On 5 February 2012 13:07, Ralf Gommers wrote: > >> On 20/01/12 08:49, Scott Sinclair wrote: >> > On 19 January 2012 21:48, Fernando Perez  wrote: >> >> We've moved to the following setup with ipython, which works very well >> >> for us so far: >> >> >> >> 1. ipython.org: Main website with only sta

Re: [Numpy-discussion] fast method to to count a particular value in a large matrix

2012-02-05 Thread Wes McKinney
On Sun, Feb 5, 2012 at 7:02 PM, David Verelst wrote: > Just out of curiosity, what speed-up factor did you achieve? > > Regards, > David > > On 04/02/12 22:20, Naresh wrote: >> Warren Weckesser  enthought.com>  writes: >> >>> >>> On Sat, Feb 4, 2012 at 2:35 PM, Benjamin Root  ou.edu>  wrote: >>> >

Re: [Numpy-discussion] fast method to to count a particular value in a large matrix

2012-02-05 Thread David Verelst
Just out of curiosity, what speed-up factor did you achieve? Regards, David On 04/02/12 22:20, Naresh wrote: > Warren Weckesser enthought.com> writes: > >> >> On Sat, Feb 4, 2012 at 2:35 PM, Benjamin Root ou.edu> wrote: >> >> >> On Saturday, February 4, 2012, Naresh Pai uark.edu> wrote:> I

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, > wrote: On Sun, Feb 5, 2012 at 12:52 PM, Paolo mailto:p.zaff...@yahoo.it>> wrote:

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

2012-02-05 Thread Warren Weckesser
On Sun, Feb 5, 2012 at 12:06 PM, wrote: > > > On Sun, Feb 5, 2012 at 12:52 PM, Paolo wrote: > >> How I can do this? >> >> > > I'm not sure without trying, numpy.loadtxt might be the easier choice > > matrix="".join((i.strip() for i in f.readlines())) > > I think strip() also removes newlines be

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

2012-02-05 Thread josef . pktd
On Sun, Feb 5, 2012 at 12:52 PM, Paolo wrote: > How I can do this? > > I'm not sure without trying, numpy.loadtxt might be the easier choice matrix="".join((i.strip() for i in f.readlines())) I think strip() also removes newlines besides other whitespace otherwise more explicitly matrix="".jo

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 > wrote: This is my code: matrix="".join(f.readlines()) my guess would be, that you have to strip the line endings \n versus \r\n Josef

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

2012-02-05 Thread josef . pktd
On Sun, Feb 5, 2012 at 12:39 PM, Paolo wrote: > This is my code: > > matrix="".join(f.readlines()) > my guess would be, that you have to strip the line endings \n versus \r\n Josef > matrix=np.fromstring(matrix, dtype=np.int16) > matrix=matrix.reshape(siz[2],siz[1],siz[0]).T > > > > > Il 05/

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

2012-02-05 Thread Paolo
This is my code: matrix="".join(f.readlines()) matrix=np.fromstring(matrix, dtype=np.int16) matrix=matrix.reshape(siz[2],siz[1],siz[0]).T Il 05/02/2012 17:21, Olivier Delalleau ha scritto: It means there is some of your code that is not entirely platform-independent. It's not possible to tel

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

2012-02-05 Thread Olivier Delalleau
It means there is some of your code that is not entirely platform-independent. It's not possible to tell you which part because you didn't provide your code. The problem may not even be numpy-related. So you should first look at the current shape of 'matrix', and what are the values of a, b and c,

[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

Re: [Numpy-discussion] dtype related deprecations

2012-02-05 Thread Travis Oliphant
Fortunately that's not the case. All that Mark is advocating is not allowing changing the *itself* in place. You are still free to change the dtype of the array in order to change the field names without making a data copy. Travis -- Travis Oliphant (on a mobile) 512-826-7480 On Feb 5, 2

Re: [Numpy-discussion] dtype related deprecations

2012-02-05 Thread Erin Sheldon
Excerpts from Mark Wiebe's message of Sat Feb 04 18:24:58 -0500 2012: > The names issue is a bit trickier. There has been some back and forth in > some tickets, and I recall some discussion on the mailing list, but that > may be long ago and without clear resolution. That this should be changed > i

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

2012-02-05 Thread Olivier Delalleau
It should mean that matrix.size != a * b * c. -=- Olivier Le 5 février 2012 09:32, Paolo a écrit : > 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

[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

Re: [Numpy-discussion] GSOC

2012-02-05 Thread Ralf Gommers
On Sun, Jan 15, 2012 at 3:02 AM, Charles R Harris wrote: > > > On Thu, Dec 29, 2011 at 2:36 PM, Ralf Gommers > wrote: > >> >> >> On Thu, Dec 29, 2011 at 9:50 PM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> Hi All, >>> >>> I thought I'd raise this topic just to get some ideas o

Re: [Numpy-discussion] Download page still points to SVN

2012-02-05 Thread Ralf Gommers
On Fri, Jan 20, 2012 at 8:49 AM, Scott Sinclair wrote: > > Issues with scipy "Trac, the doc editor, and the conference.scipy.org > and docs.scipy.org" as mentioned by Pauli. There is also the cookbook > on the wiki to consider (perhaps http://scipy-central.org/ could play > a role there). > > Cle

Re: [Numpy-discussion] Download page still points to SVN

2012-02-05 Thread Ralf Gommers
On Fri, Jan 20, 2012 at 12:53 PM, David Verelst wrote: > I would like to assist on the website. Although I have not made any code > contributions to Numpy/SciPy (yet), I do follow the mailing lists and > try to keep up to date on the scientific python scene. However, I need > to hold my breath unt