Re: [Numpy-discussion] dimensions too large error

2008-03-14 Thread Anne Archibald
On 14/03/2008, Dinesh B Vadhia <[EMAIL PROTECTED]> wrote: > For the following code: > > I = 18000 > J = 33000 > filename = 'ij.txt' > A = scipy.asmatrix(numpy.empty((I,J), dtype=numpy.int)) > for line in open(filename, 'r'): > etc. > > The following message appears: > > Traceback (most

Re: [Numpy-discussion] dimensions too large error

2008-03-14 Thread Stéfan van der Walt
Hi Dinesh On Fri, Mar 14, 2008 at 6:00 PM, Dinesh B Vadhia <[EMAIL PROTECTED]> wrote: > For the following code: > > I = 18000 > J = 33000 > filename = 'ij.txt' > A = scipy.asmatrix(numpy.empty((I,J), dtype=numpy.int)) > for line in open(filename, 'r'): > etc. > > The following message

[Numpy-discussion] dimensions too large error

2008-03-14 Thread Dinesh B Vadhia
For the following code: I = 18000 J = 33000 filename = 'ij.txt' A = scipy.asmatrix(numpy.empty((I,J), dtype=numpy.int)) for line in open(filename, 'r'): etc. The following message appears: Traceback (most recent call last): File "C:\...\py", line 362, in A= scipy.asmatri

Re: [Numpy-discussion] Read array from file

2008-03-14 Thread Lisandro Dalcin
If you just want to manage VTK files, the you have to definitely try pyvtk. http://cens.ioc.ee/projects/pyvtk/ I have a similar numpy-based but independent implementation, not fully tested, targeted to only write VTK files for big datasets (let say, more than 1 millon nodes) in eider ascii or byna

Re: [Numpy-discussion] fromiter + dtype='S' -> Python crash

2008-03-14 Thread Travis E. Oliphant
Zbyszek Szmek wrote: > On Thu, Mar 13, 2008 at 05:44:54PM -0400, Alan G Isaac wrote: > >> Looks like I misunderstood your question: >> you want an **array** of strings? >> In principle you should be able to use ``fromiter``, >> I believe, but it does not work. BUG? (Crasher.) >> >> > i

Re: [Numpy-discussion] subset of array - statistics

2008-03-14 Thread David Huard
Look at the timeseries package in scikits (only on svn i'm afraid). You'll find exactly what you're looking for. Conversion from daily to monthly or yearly time series is a breeze. Cheers, David 2008/3/13, Joris De Ridder <[EMAIL PROTECTED]>: > > > I am new to the world of Python and numpy > > >

Re: [Numpy-discussion] Help needed with numpy 10.5 release blockers

2008-03-14 Thread David Huard
I added a test for ticket 691. Problem is, there seems to be a new bug. I don't know it its related to the change or if it was there before. Please check this out. David 2008/3/14, David Huard <[EMAIL PROTECTED]>: > > I added a test for ticket 690. > > 2008/3/13, Barry Wark <[EMAIL PROTECTED]>: >

Re: [Numpy-discussion] Help needed with numpy 10.5 release blockers

2008-03-14 Thread David Huard
I added a test for ticket 690. 2008/3/13, Barry Wark <[EMAIL PROTECTED]>: > > I appologize that the Mac OSX buildbot has been so flakey. For some > reason it stops being able to resolve scipy.org on a regular basis > (though other processes on the same machine don't seem to have > trouble). Restar

Re: [Numpy-discussion] fromiter + dtype='S' -> Python crash

2008-03-14 Thread Zbyszek Szmek
On Thu, Mar 13, 2008 at 05:44:54PM -0400, Alan G Isaac wrote: > Looks like I misunderstood your question: > you want an **array** of strings? > In principle you should be able to use ``fromiter``, > I believe, but it does not work. BUG? (Crasher.) > > >>> import numpy as N > >>> x = [1,2,3] > >>>

Re: [Numpy-discussion] Read array from file

2008-03-14 Thread lorenzo bolla
what about numpy.loadtxt? In [9]: numpy.loadtxt('test.dat', skiprows=5) Out[9]: array([[ 15.44261, 12.05814, 54.43124], [ 15.54899, 12.00075, 53.85503], [ 15.95802, 11.92959, 53.88939], [ 15.84085, 12.00235, 54.43274], [ 15.53889, 11.16645, 54.51649], [

[Numpy-discussion] Read array from file

2008-03-14 Thread Dimitrios Kiousis
Hello python users, I have an input file consisting of string-lines and float-lines. This is how it looks: # vtk DataFile Version 3.0 VTK file exported from FEAP ASCII DATASET UNSTRUCTURED_GRID POINTS6935 FLOAT 15.44261 12.05814 54.43124 15.54899 12.00075 53.85503 15.95802 11