Re: [Numpy-discussion] newbie: convert recarray to floating-point ndarray with mixed types

2010-05-12 Thread Eric Firing
On 05/12/2010 12:37 PM, Gregory, Matthew wrote: > Apologies for what is likely a simple question and I hope it hasn't been > asked before ... > > Given a recarray with a dtype consisting of more than one type, e.g. > >>>> import numpy as n >>>> a = n.array([(1.0, 2), (3.0, 4)], dtype=[('

Re: [Numpy-discussion] Bug with how numpy.distutils.system_info handles the site.cfg

2010-05-12 Thread Chris Colbert
On Wed, May 12, 2010 at 11:06 PM, Chris Colbert wrote: > I had this problem back in 2009 when building Enthought Enable, and was > happy with a work around. It just bit me again, and I finally got around to > drilling down to the problem. > > On linux, if one uses the numpy/site.cfg [default] sec

[Numpy-discussion] Bug with how numpy.distutils.system_info handles the site.cfg

2010-05-12 Thread Chris Colbert
I had this problem back in 2009 when building Enthought Enable, and was happy with a work around. It just bit me again, and I finally got around to drilling down to the problem. On linux, if one uses the numpy/site.cfg [default] section when building from source to specifiy local library directori

Re: [Numpy-discussion] efficient way to manage a set of floats?

2010-05-12 Thread Robert Kern
On Wed, May 12, 2010 at 21:37, wrote: > On Wed, May 12, 2010 at 9:27 PM, Robert Kern wrote: >> On Wed, May 12, 2010 at 20:09, Dr. Phillip M. Feldman >> wrote: >>> >>> Warren Weckesser-3 wrote: A couple questions: How many floats will you be storing? When you test f

Re: [Numpy-discussion] efficient way to manage a set of floats?

2010-05-12 Thread Benjamin Root
On Wed, May 12, 2010 at 8:37 PM, wrote: > On Wed, May 12, 2010 at 9:27 PM, Robert Kern > wrote: > > On Wed, May 12, 2010 at 20:09, Dr. Phillip M. Feldman > > wrote: > >> > >> Warren Weckesser-3 wrote: > >>> > >>> A couple questions: > >>> > >>> How many floats will you be storing? > >>> > >>> W

Re: [Numpy-discussion] efficient way to manage a set of floats?

2010-05-12 Thread Anne Archibald
On 12 May 2010 20:09, Dr. Phillip M. Feldman wrote: > > > Warren Weckesser-3 wrote: >> >> A couple questions: >> >> How many floats will you be storing? >> >> When you test for membership, will you want to allow for a numerical >> tolerance, so that if the value 1 - 0.7 is added to the set, a test

Re: [Numpy-discussion] efficient way to manage a set of floats?

2010-05-12 Thread josef . pktd
On Wed, May 12, 2010 at 9:27 PM, Robert Kern wrote: > On Wed, May 12, 2010 at 20:09, Dr. Phillip M. Feldman > wrote: >> >> Warren Weckesser-3 wrote: >>> >>> A couple questions: >>> >>> How many floats will you be storing? >>> >>> When you test for membership, will you want to allow for a numerica

Re: [Numpy-discussion] efficient way to manage a set of floats?

2010-05-12 Thread Robert Kern
On Wed, May 12, 2010 at 20:09, Dr. Phillip M. Feldman wrote: > > Warren Weckesser-3 wrote: >> >> A couple questions: >> >> How many floats will you be storing? >> >> When you test for membership, will you want to allow for a numerical >> tolerance, so that if the value 1 - 0.7 is added to the set,

[Numpy-discussion] default behavior of argsort

2010-05-12 Thread Dr. Phillip M. Feldman
When operating on an array whose last dimension is unity, the default behavior of argsort is not very useful: |6> x=random.random((4,1)) |7> shape(x) <7> (4, 1) |8> argsort(x) <8> array([[0], [0], [0], [0]]) |9> argsort(x,axis=0)

Re: [Numpy-discussion] efficient way to manage a set of floats?

2010-05-12 Thread Dr. Phillip M. Feldman
Warren Weckesser-3 wrote: > > A couple questions: > > How many floats will you be storing? > > When you test for membership, will you want to allow for a numerical > tolerance, so that if the value 1 - 0.7 is added to the set, a test for > the value 0.3 returns True? (0.3 is actually 0.2999

[Numpy-discussion] newbie: convert recarray to floating-point ndarray with mixed types

2010-05-12 Thread Gregory, Matthew
Apologies for what is likely a simple question and I hope it hasn't been asked before ... Given a recarray with a dtype consisting of more than one type, e.g. >>> import numpy as n >>> a = n.array([(1.0, 2), (3.0, 4)], dtype=[('x', float), ('y', int)]) >>> b = a.view(n.recarray) >>> b