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

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 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 to my > ques

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 have

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 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 think this

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 field

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/ in () > > TypeError:

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 . This was solved by > using the apple python along with the scipy superpack. This sure sounds like a bug in the sciy superpac

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 > Oh okay, that's unfortunate but I guess not unexpected. Regardless, thank > you so much for all your help Ralf, Bruc

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 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 al

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 Ralf Gommers
On Tue, Aug 2, 2011 at 6:57 PM, Thomas Markovich wrote: > 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_m

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, , 'F', 2, 'SM', None, 0.5, ) ... Segmentation fault"

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 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 r

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 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 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 > Hi All, > > I installed numpy from the scipy superpack on Snow Leopard with python 2.7 > and it

[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 /Library/Frameworks/Python.framework/Versions/2.7/l

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 wrote: > On Tue, Aug 2, 2011 at 9:44 AM, Jeremy Conlin 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 float

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 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 attempts. I've copi

[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 wro

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 wrote: > > 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 > for weird com

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 para

Re: [Numpy-discussion] hold parameters

2011-08-02 Thread josef . pktd
On Mon, Aug 1, 2011 at 8: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