[Numpy-discussion] How to start at line # x when using numpy.memmap

2011-08-19 Thread Jeremy Conlin
I would like to use numpy's memmap on some data files I have. The first 12 or so lines of the files contain text (header information) and the remainder has the numerical data. Is there a way I can tell memmap to skip a specified number of lines instead of a number of bytes? Thanks, Jeremy

Re: [Numpy-discussion] How to start at line # x when using numpy.memmap

2011-08-19 Thread Jeremy Conlin
On Fri, Aug 19, 2011 at 7:19 AM, Pauli Virtanen p...@iki.fi wrote: Fri, 19 Aug 2011 07:00:31 -0600, Jeremy Conlin wrote: I would like to use numpy's memmap on some data files I have. The first 12 or so lines of the files contain text (header information) and the remainder has the numerical

Re: [Numpy-discussion] How to start at line # x when using numpy.memmap

2011-08-19 Thread Jeremy Conlin
On Fri, Aug 19, 2011 at 8:01 AM, Brent Pedersen bpede...@gmail.com wrote: On Fri, Aug 19, 2011 at 7:29 AM, Jeremy Conlin jlcon...@gmail.com wrote: On Fri, Aug 19, 2011 at 7:19 AM, Pauli Virtanen p...@iki.fi wrote: Fri, 19 Aug 2011 07:00:31 -0600, Jeremy Conlin wrote: I would like to use

[Numpy-discussion] Finding many ways to incorrectly create a numpy array. Please advice

2011-08-02 Thread Jeremy Conlin
I am trying to create a numpy array from some text I'm reading from a file. Ideally, I'd like to create a structured array with the first element as an int and the remaining as floats. I'm currently unsuccessful in my attempts. I've copied a simple script below that shows what I've done and the

Re: [Numpy-discussion] Finding many ways to incorrectly create a numpy array. Please advice

2011-08-02 Thread Jeremy Conlin
On Tue, Aug 2, 2011 at 9:09 AM, Brett Olsen brett.ol...@gmail.com wrote: On Tue, Aug 2, 2011 at 9:44 AM, Jeremy Conlin jlcon...@gmail.com wrote: I am trying to create a numpy array from some text I'm reading from a file. Ideally, I'd like to create a structured array with the first element

Re: [Numpy-discussion] Finding many ways to incorrectly create a numpy array. Please advice

2011-08-02 Thread Jeremy Conlin
On Tue, Aug 2, 2011 at 11:15 AM, Christopher Barker chris.bar...@noaa.gov wrote: On 8/2/11 8:38 AM, Jeremy Conlin wrote: Thanks, Brett. Using StringIO and numpy.loadtxt worked great. I'm still curious why what I was doing didn't work. Everything I can see indicates it should work. In [11

[Numpy-discussion] Can I index array starting with 1?

2011-07-28 Thread Jeremy Conlin
I have a need to index my array(s) starting with a 1 instead of a 0. The reason for this is to be consistent with the documentation of a format I'm accessing. I know I can just '-1' from what the documentation says, but that can get cumbersome. Is there a magic flag I can pass to a numpy array

Re: [Numpy-discussion] Please help with subclassing numpy.ndarray

2007-02-06 Thread Jeremy Conlin
On 2/6/07, Sturla Molden [EMAIL PROTECTED] wrote: def __new__(cls,...) ... (H, edges) = numpy.histogramdd(..) cls.__defaultedges = edges def __array_finalize__(self, obj): if not hasattr(self, 'edges'): self.edges = self.__defaultedges So in order to

Re: [Numpy-discussion] Please help with subclassing numpy.ndarray

2007-02-05 Thread Jeremy Conlin
On 2/4/07, Pierre GM [EMAIL PROTECTED] wrote: On Sunday 04 February 2007 20:22:44 Jeremy Conlin wrote: I have subclassed the numpy.ndarray object, but need some help setting some attributes. I have read http://scipy.org/Subclasses but it doesn't provide the answer I am looking

Re: [Numpy-discussion] Please help with subclassing numpy.ndarray

2007-02-05 Thread Jeremy Conlin
On 2/5/07, Pierre GM [EMAIL PROTECTED] wrote: On Monday 05 February 2007 11:32:22 Jeremy Conlin wrote: Thanks for clarifying that. I didn't understand what the __array_finalize__ did. That means I should clarify some points on the wiki, then. A good exercise is to put some temporary

[Numpy-discussion] svn numpy did not build on os x

2007-01-24 Thread Jeremy Conlin
I also have been unable to build numpy on OS X although my error(s) are slightly different from the original poster. I just installed python2.5 from the binary at python.org. Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type help,

Re: [Numpy-discussion] svn numpy did not build on os x

2007-01-24 Thread Jeremy Conlin
On 1/24/07, Steve Lianoglou [EMAIL PROTECTED] wrote: Hi, I got gfortran from hpc.sourceforge.net. I just now noticed that my gcc is experimental, I hope that isn't the issue. It probably is the issue. One thing to note is that (at least when I d/l'd it), the hpc fortran download also