[Numpy-discussion] Simple Loadtxt question

2012-11-28 Thread Robert Love
I have a file with thousands of lines like this: Signal was returned in 204 microseconds Signal was returned in 184 microseconds Signal was returned in 199 microseconds Signal was returned in 4274 microseconds Signal was returned in 202 microseconds Signal was returned in 189 microseconds I try

[Numpy-discussion] dtype and shape for 1.6.1 seems broken?

2011-08-18 Thread Robert Love
This works under 1.5.1 and 1.6.0 but gives me errors in 1.6.1 import numpy as np def main(): printnumpy version: + np.__version__ zdt = np.dtype([('et','i4'),('r','f8',3)]) zdata = np.loadtxt('zdum.txt', zdt) In 1.6.1 I get this error: ValueError: setting an array element with a

Re: [Numpy-discussion] Quaternion dtype for NumPy - initial implementation available

2011-07-28 Thread Robert Love
On Jul 28, 2011, at 7:42 AM, Martin Ling wrote: On Wed, Jul 27, 2011 at 10:29:08PM -0500, Robert Love wrote: To use quaternions I find I often need conversion to/from matrices and to/from Euler angles. Will you add that functionality? Yes, I intend to. Note that these conversions

Re: [Numpy-discussion] Quaternion dtype for NumPy - initial implementation available

2011-07-27 Thread Robert Love
To use quaternions I find I often need conversion to/from matrices and to/from Euler angles. Will you add that functionality? Will you handle the left versor and right versor versions? I have a set of pure python code I've sketched out for my needs (aerospace) but would be happy to have an

Re: [Numpy-discussion] ANN: EPD 7.1 released

2011-07-08 Thread Robert Love
How does this match up with the recently announced release of ETS-4.0? Are the versions of the python modules the same? On Jul 8, 2011, at 12:37 AM, Ilan Schnell wrote: Hello, I am pleased to announce that EPD (Enthought Python Distribution) version 7.1 has been released. The most

[Numpy-discussion] Importing a list into a structured numpy array, what is my error?

2011-05-18 Thread Robert Love
my_list = [[1960, 'W0'],[2001, 'D5']] my_arr = np.array(my_list, dtype=('uint', '|S2')) gives me an error I don't understand: ValueError: mismatch in size of old and new data-descriptor What are the old and new? I get the same problem if try np.asarray() If I make the dtype ('|S4',

[Numpy-discussion] Arrays as nested dtype

2011-04-08 Thread Robert Love
Using np.loadtxt I can easily read my file that has columns of time, mode, 3 float64 for position and 3 for velocity like this. dt = dtype([('time', '|S12'), ('mode','|S3'),('rx','f8'),('ry','f8'),('rz','f8'),('vx','f8'),('vy','f8'),('vz','f8')]) data = np.loadtxt('file', dtype=dt) I can

Re: [Numpy-discussion] Reading and Comparing Two Files

2010-02-28 Thread Robert Love
On Feb 28, 2010, at 6:24 AM, Friedrich Romstedt wrote: 2010/2/28 Robert Love rblove_li...@comcast.net: What is the efficient numpy way to compare data from two different files? For the nth line in each file I want to operate on the numbers. I've been using loadtxt() data_5x5

[Numpy-discussion] Reading and Comparing Two Files

2010-02-27 Thread Robert Love
What is the efficient numpy way to compare data from two different files? For the nth line in each file I want to operate on the numbers. I've been using loadtxt() data_5x5 = N.loadtxt(file5) data_8x8 = N.loadtxt(file8) for line in data_5x5: pos5 = N.array([line[0], line[1],

Re: [Numpy-discussion] Enthought Python Distribution

2008-07-06 Thread Robert Love
On Jul 2, 2008, at 9:34 AM, Travis Vaught wrote: Greetings, We're pleased to announce the beta release of the Enthought Python Distribution for *Mac OS X*. Oh Happiness, Oh Joy. I'm downloading it now. Have a virtual beer on me until I can get to Austin and buy you all a real one. /s/

Re: [Numpy-discussion] ANN: Enthought Python Distribution - Beta

2008-02-28 Thread Robert Love
I'd drive to Austin and wash and wax their cars if there was an OSX distribution. OK, mild exaggeration but I'd buy them a beer or two. On Feb 28, 2008, at 9:18 AM, Steve Lianoglou wrote: On Wed, 27 Feb 2008, Travis Vaught apparently wrote: http://www.enthought.com/epd Looks good. An