Re: [Numpy-discussion] limit to number of fields in recarray

2011-08-02 Thread Pierre GM
On Aug 2, 2011, at 1:20 AM, Craig Yoshioka wrote: Is there a limit to the number of fields a numpy recarray can have? I was getting a strange error about a duplicate column name, but it wasn't a duplicate. And the error was… ? ___

Re: [Numpy-discussion] hold parameters

2011-08-02 Thread josef . pktd
On Mon, Aug 1, 2011 at 8:43 PM, Bevan Jenkins beva...@gmail.com wrote: Hello, I have a function that I fitting to a curve via scipy.optimize.leastsq.  The function has 4 parameters and this is all working fine. For a site, I have a number of curves (n=10 in the example below).  I would like

Re: [Numpy-discussion] hold parameters

2011-08-02 Thread Bruce Southey
On 08/01/2011 07:43 PM, Bevan Jenkins wrote: Hello, I have a function that I fitting to a curve via scipy.optimize.leastsq. The function has 4 parameters and this is all working fine. For a site, I have a number of curves (n=10 in the example below). I would like to some of the parameters

Re: [Numpy-discussion] numpy.sqrt behaving differently on MacOS Lion

2011-08-02 Thread Ralf Gommers
On Wed, Jul 27, 2011 at 10:33 PM, Ilan Schnell ischn...@enthought.comwrote: Please don't distribute a different numpy binary for each version of MacOS X. +1 Maybe I should mention that I just finished testing all Python packages in EPD under 10.7, and everything (execpt numpy.sqr

[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 Brett Olsen
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 as an int and the remaining as floats. I'm currently unsuccessful in my

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 as

[Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Thomas Markovich
Hi All, I installed numpy from the scipy superpack on Snow Leopard with python 2.7 and it all appears to work but when I do the following, I get a segmentation fault. import numpy print numpy.__version__, numpy.__file__ 2.0.0.dev-b5cdaee

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Olivier Delalleau
It's a wild guess, but in the past I've had seg faults issues on Mac due to conflicting versions of Python. Do you have multiple Python installs on your Mac? -=- Olivier 2011/8/2 Thomas Markovich thomasmarkov...@gmail.com Hi All, I installed numpy from the scipy superpack on Snow Leopard

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Thomas Markovich
I just have the default apple version of python that comes with Snow Leopard (Python 2.6.1 (r261:67515, Aug 2 2010, 20:10:18)) and python 2.7 (Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) ) installed. Should I just remove 2.7 and reinstall everything with the standard apple python?

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Bruce Southey
On 08/02/2011 11:14 AM, Thomas Markovich wrote: I just have the default apple version of python that comes with Snow Leopard (Python 2.6.1 (r261:67515, Aug 2 2010, 20:10:18)) and python 2.7 (Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) ) installed. Should I just remove 2.7 and

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Ralf Gommers
On Tue, Aug 2, 2011 at 6:14 PM, Thomas Markovich thomasmarkov...@gmail.comwrote: I just have the default apple version of python that comes with Snow Leopard (Python 2.6.1 (r261:67515, Aug 2 2010, 20:10:18)) and python 2.7 (Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) )

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Thomas Markovich
It appears that uninstalling python 2.7 and installing the scipy superpack with the apple standard python removes the segfaulting behavior from numpy. Now it appears that just scipy is segfaulting at test test_arpack.test_hermitian_modes(True, std-hermitian, 'F', 2, 'SM', None, 0.5, function

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Ralf Gommers
On Tue, Aug 2, 2011 at 6:57 PM, Thomas Markovich thomasmarkov...@gmail.comwrote: It appears that uninstalling python 2.7 and installing the scipy superpack with the apple standard python removes the segfaulting behavior from numpy. Now it appears that just scipy is segfaulting at test

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Derek Homeier
On 2 Aug 2011, at 18:57, Thomas Markovich wrote: It appears that uninstalling python 2.7 and installing the scipy superpack with the apple standard python removes the Did the superpack installer automatically install numpy to the python2.7 directory when present? Even if so, I reckon you

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Thomas Markovich
Oh okay, that's unfortunate but I guess not unexpected. Regardless, thank you so much for all your help Ralf, Bruce, and Oliver! You guys are great. Just to recap, the issue appears to stem from using the scipy superpack with python 2.7 from python.org. This was solved by using the apple python

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

2011-08-02 Thread Christopher Barker
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]: tfc_dtype Out[11]: dtype([('nps', 'u8'), ('t', 'f8'), ('e', 'f8'), ('fom', 'f8')])

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Olivier Delalleau
Maybe specify which scipy superpack. Your issue was probably because the superpack you installed was not meant to be used with Python 2.7. -=- Olivier 2011/8/2 Thomas Markovich thomasmarkov...@gmail.com Oh okay, that's unfortunate but I guess not unexpected. Regardless, thank you so much for

Re: [Numpy-discussion] Segmentation Fault in Numpy.test()

2011-08-02 Thread Christopher Barker
On 8/2/11 10:14 AM, Thomas Markovich wrote: Just to recap, the issue appears to stem from using the scipy superpack with python 2.7 from python.org http://python.org. This was solved by using the apple python along with the scipy superpack. This sure sounds like a bug in the sciy superpack

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

2011-08-02 Thread Derek Homeier
On 2 Aug 2011, at 19:15, Christopher Barker wrote: In [32]: s = numpy.array(a, dtype=tfc_dtype) --- TypeError Traceback (most recent call last) /Users/cbarker/ipython console in

Re: [Numpy-discussion] limit to number of fields in recarray

2011-08-02 Thread Craig Yoshioka
duplicate column in dtype? I just consolidated some of the columns and the error went away... none had duplicate field names... hence the question. On Aug 1, 2011, at 11:18 PM, Pierre GM wrote: On Aug 2, 2011, at 1:20 AM, Craig Yoshioka wrote: Is there a limit to the number of fields a

Re: [Numpy-discussion] limit to number of fields in recarray

2011-08-02 Thread Skipper Seabold
On Tue, Aug 2, 2011 at 3:19 PM, Craig Yoshioka crai...@me.com wrote: duplicate column in dtype? Duplicate field names given.? Can you post code to replicate? I just consolidated some of the columns and the error went away... none had duplicate field names... hence the question. I don't

Re: [Numpy-discussion] limit to number of fields in recarray

2011-08-02 Thread Craig Yoshioka
yup, duplicate field names given. I didn't commit the non-working version and I didn't want to mess up my working code so I tried duplicating the dtype in a new file and couldn't recreate the error. I suppose the answer to my question is, there is no limit to the number of records? Must

Re: [Numpy-discussion] limit to number of fields in recarray

2011-08-02 Thread Skipper Seabold
On Tue, Aug 2, 2011 at 4:09 PM, Craig Yoshioka crai...@me.com wrote: yup, duplicate field names given.  I didn't commit the non-working version and I didn't want to mess up my working code so I tried duplicating the dtype in a new file and couldn't recreate the error.   I suppose the answer

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]: