Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-02 Thread Neil Martinsen-Burrell
On 2010-02-02 20:31 , Robert Kern wrote: > On Tue, Feb 2, 2010 at 20:23, Neil Martinsen-Burrell > wrote: > >> I don't understand Travis's comment that "datetime is just a >> place-holder for data". > > That's not a direct quote and is a m

Re: [Numpy-discussion] Removing datetime support for 1.4.x series ?

2010-02-02 Thread Neil Martinsen-Burrell
On 2010-02-02 19:53 , David Cournapeau wrote: > Travis Oliphant wrote: > >> I think we just signal the breakage in 1.4.1 and move forward. The >> datetime is useful as a place-holder for data. Math on date-time arrays >> just doesn't work yet.I don't think removing it is the right >> app

Re: [Numpy-discussion] indexing, searchsorting, ...

2010-01-26 Thread Neil Martinsen-Burrell
On 2010-01-26 10:22 , Jan Strube wrote: > Dear Josef and Keith, > > thank you both for your suggestions. I think intersect would be what I > want for it makes clean code. > I have, however, spotted the problem: > I was mistakenly under the assumption that random_integers returns > unique entries, w

Re: [Numpy-discussion] problem with FortranFile

2009-11-08 Thread Neil Martinsen-Burrell
ttached version of fortranfile.py should do the trick. Let me know if it does or doesn't help. [As an aside, fortranfile.py is code that I've written that isn't part of Numpy and perhaps the right place for any discussions of it is off-list.] -Neil # Copyright 2008, 2009 Neil

Re: [Numpy-discussion] using FortranFile to read data from a binary Fortran file

2009-11-04 Thread Neil Martinsen-Burrell
On 2009-11-03 20:18 , Brennan Williams wrote: > ok I took a closer look at FortranFile and I'm now doing the following. > Note that the first line in the file I'm reading > has two double precision reals/floats followed by 8 32 bit integers. > >f=FortranFile(fullfilename,endian='<') >

Re: [Numpy-discussion] numpy.reshape() bug?

2009-09-28 Thread Neil Martinsen-Burrell
On 2009-09-28 15:39 , Chris wrote: > I am trying to "collapse" two dimensions of a 3-D array, using reshape: > > (Pdb) dims = np.shape(trace) > (Pdb) dims > Out[2]: (1000, 4, 3) > (Pdb) newdims = (dims[0], sum(dims[1:])) > (Pdb) newdims > Out[2]: (1000, 7) > > However, reshape seems to think I am m

Re: [Numpy-discussion] F2PY error : ... on platform 'posix' with 'gcc' compiler

2009-09-25 Thread Neil Martinsen-Burrell
On 2009-09-25 15:36 , Arthur Bousquet wrote: > Thanks a lot for you help. Now it is working, I downloaded the gfortran > from http://hpc.sourceforge.net/. I will take the opportunity to steal Robert's line and say that the gfortran available from that site has had numerous problems in the past.

Re: [Numpy-discussion] creating mesh data from xyz data

2009-09-08 Thread Neil Martinsen-Burrell
On 2009-09-08 10:38 , Christopher Barker wrote: > Giuseppe Aprea wrote: >> I have some files with data stored in columns: >> >> x1 y1 z1 >> x2 y2 z2 >> x3 y3 z3 >> x4 y4 z4 >> x5 y5 z5 >> I usually load data using 3 lists: x, y and z; I wonder if there is >>

Re: [Numpy-discussion] Why is the truth value of ndarray not simply size>0 ?

2009-09-07 Thread Neil Martinsen-Burrell
On 2009-09-07 07:11 , Robert wrote: > Is there a reason why ndarray truth tests (except scalars) > deviates from the convention of other Python iterables > list,array.array,str,dict,... ? > > Furthermore there is a surprising strange exception for arrays > with size 1 (!= scalars). Historically, n

Re: [Numpy-discussion] future directions

2009-08-27 Thread Neil Martinsen-Burrell
On 2009-08-27 19:56 , David Goldsmith wrote: > --- On Thu, 8/27/09, Fons Adriaensen wrote: [...] >> 3. Finally remove all the redundancy and legacy stuff from the >> world of numerical Python. It is *very* confusing to a new user. > > I like this also (but I also know that actually trying to ach

Re: [Numpy-discussion] Efficiently defining a multidimensional array

2009-08-27 Thread Neil Martinsen-Burrell
On 2009-08-27 16:09 , Jonathan T wrote: > Hi, > > I want to define a 3-D array as the sum of two 2-D arrays as follows: > > C[x,y,z] := A[x,y] + B[x,z] > > My linear algebra is a bit rusty; is there a good way to do this that does not > require me to loop over x,y,z? Thanks! Numpy's broadcasti

Re: [Numpy-discussion] why does b[:-0] not work, and is there an elegant solution?

2009-08-19 Thread Neil Martinsen-Burrell
On Aug 19, 2009, at 7:25 AM, Mark Bakker wrote: > I compute the index of the last term in an array that I need and > call the index n. > > I can then call the array b as > > b[:-n] > > If I need all terms in the array, the logical syntax would be: > > b[:-0] > > but that doesn't work. Any reason

Re: [Numpy-discussion] Specifying Index Programmatically

2009-08-08 Thread Neil Martinsen-Burrell
On 2009-08-08 22:46 , T J wrote: > I have an array, and I need to index it like so: > > z[...,x,:] > > How can I write code which will index z, as above, when x is not known > ahead of time. For that matter, the particular dimension I am querying > is not known either. In case this is still c

Re: [Numpy-discussion] Features in SciPy That are Absent in NumPy

2009-08-04 Thread Neil Martinsen-Burrell
On 2009-08-04 14:36 , Nanime Puloski wrote: > What features does SciPy have that are absent in NumPy? Many. SciPy includes algorithms for optimization, solving differential equations, numerical integration among many others. NumPy primarily provides a useful n-dimensional array container. Whi

Re: [Numpy-discussion] Python 3.n and Scipy Numpy

2009-07-30 Thread Neil Martinsen-Burrell
On 2009-07-30 14:13 , BBands wrote: > Could someone point me toward some information on Scipy/Numpy and > Python 3.1? I'd like to upgrade, but can't seem to find the path. There is no such path right now. Numpy and Scipy are only available for Python 2.x (with x >= 4). As very large C extension

Re: [Numpy-discussion] loading data

2009-06-25 Thread Neil Martinsen-Burrell
On Thu, June 25, 2009 7:59 pm, Mag Gam wrote: > I am very new to NumPy and Python. We are doing some research in our > Physics lab and we need to store massive amounts of data (100GB > daily). I therefore, am going to use hdf5 and h5py. The problem is I > am using np.loadtxt() to create my array an

Re: [Numpy-discussion] Interleaved Arrays and

2009-06-16 Thread Neil Martinsen-Burrell
On 2009-06-16 16:05 , Robert wrote: > Neil Martinsen-Burrell wrote: >> On 06/16/2009 02:18 PM, Robert wrote: >>>>>> n = 10 >>>>>> xx = np.ones(n) >>>>>> yy = np.arange(n) >>>>>> aa = np.c

Re: [Numpy-discussion] Interleaved Arrays and

2009-06-16 Thread Neil Martinsen-Burrell
On 06/16/2009 02:18 PM, Robert wrote: > >>> n = 10 > >>> xx = np.ones(n) > >>> yy = np.arange(n) > >>> aa = np.column_stack((xx,yy)) > >>> bb = np.column_stack((xx+1,yy)) > >>> aa > array([[ 1., 0.], > [ 1., 1.], > [ 1., 2.], > [ 1., 3.], >

Re: [Numpy-discussion] Array resize question

2009-06-16 Thread Neil Martinsen-Burrell
On 2009-06-16 09:42 , Cristi Constantin wrote: > Good day. > I have this array: > > a = array([[u'0', u'0', u'0', u'0', u'0', u' '], > [u'1', u'1', u'1', u'1', u'1', u' '], > [u'2', u'2', u'2', u'2', u'2', u' '], > [u'3', u'3', u'3', u'3', u'3', u' '], > [u'4', u'4', u'4', u'4', u'4', u'']], > dtyp

Re: [Numpy-discussion] example reading binary Fortran file

2009-05-29 Thread Neil Martinsen-Burrell
quot;"") ux, uy = fortranfile.FortranFile('uxuyp.bin').readSpec(spec) Best of luck. Peace, -Neil # Copyright 2008 Neil Martinsen-Burrell # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file

Re: [Numpy-discussion] example reading binary Fortran file

2009-05-28 Thread Neil Martinsen-Burrell
On 2009-05-28 12:11 , David Froger wrote: > Thank you very much :-) Things should be cleared up now on the wiki as well. Peace, -Neil ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] example reading binary Fortran file

2009-05-28 Thread Neil Martinsen-Burrell
On 2009-05-28 09:32 , David Froger wrote: Hy Neil Martinsen-Burrell, I'm trying the FortranFile class, http://www.scipy.org/Cookbook/FortranIO/FortranFile It looks like there are some bug in the last revision (7): * There are errors cause by lines 60,61,63 in * There are indent

Re: [Numpy-discussion] error building numpy: no file refecount.c

2009-05-05 Thread Neil Martinsen-Burrell
On 2009-05-05 12:12 , Charles R Harris wrote: > > > On Tue, May 5, 2009 at 11:08 AM, Charles R Harris > mailto:charlesr.har...@gmail.com>> wrote: > > > > On Tue, May 5, 2009 at 10:48 AM, dmitrey > wrote: > > Hi all, > I've got the error dur

Re: [Numpy-discussion] example reading binary Fortran file

2009-02-01 Thread Neil Martinsen-Burrell
David Froger gmail.com> writes: > Hy,My question is about reading Fortran binary file (oh no this question > again...) I've posted this before, but I finally got it cleaned up for the Cookbook. For this purpose I use a subclass of file that has methods for reading unformatted Fortran data. Se

Re: [Numpy-discussion] FFT usage / consistency

2008-07-29 Thread Neil Martinsen-Burrell
Felix Richter physik3.uni-rostock.de> writes: > > > Do your answers differ from the theory by a constant factor, or are > > they completely unrelated? > > No, it's more complicated. Below you'll find my most recent, more stripped > down code. > > - I don't know how to scale in a way that work

Re: [Numpy-discussion] weird numpy/pickle problem

2007-11-02 Thread Neil Martinsen-Burrell
On 11/2/07 12:00, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Date: Fri, 2 Nov 2007 12:58:33 -0400 > From: Brian Blais <[EMAIL PROTECTED]> > Subject: [Numpy-discussion] weird numpy/pickle problem > To: numpy-discussion@scipy.org > > I boiled it down to the code below. Can anyone reproduce (o