Re: [Numpy-discussion] when numpy in Linux apt will be updated? It's still 1.3.0 with many bugs

2011-03-24 Thread sam tygier
On 24/03/11 10:00, Dmitrey wrote: > hi, > when numpy in Linux apt will be updated? It's still 1.3.0 with many bugs > > I have Linux KUBUNTU 10.10 > > D. (k)ubuntu 11.04 (to be released in april) will have at numpy 1.5.1 (or possible newer) https://launchpad.net/ubuntu/+source/python-numpy also s

Re: [Numpy-discussion] Boolean indexing

2011-03-08 Thread Sam Tygier
2011-03-08 14:29:07 GMT, Sturla Molden: >A "boolean slice" cannot be indexed with the dot product of dimensions and strides, hence the copy. >You probably want to use masked arrays instead. Masked array does not seem to help. when i do: am = numpy.ma.array(a, mask=a[n]['name']=="foo") am['x'] +=

[Numpy-discussion] Boolean indexing

2011-03-08 Thread Sam Tygier
Hi I am having an issue with boolean slicing. it seems to work fine for reading a value, but I can use it to set a value: import numpy b = numpy.array([[1,2],[3,4],[5,6],[7,8],[9,10]]) m = numpy.array([0,1,0,0,0], dtype=bool) print b[m] print b[m][0,0] b[m][0,0] = -1 print b[m][0,0] I think th

Re: [Numpy-discussion] ANN: NumPy 1.5.0 beta 1

2010-08-03 Thread sam tygier
On 01/08/10 17:38, Ralf Gommers wrote: > I am pleased to announce the availability of the first beta of NumPy > 1.5.0. This will be the first NumPy release to include support for > Python 3, as well as for Python 2.7. Please try this beta and report any > problems on the NumPy mailing list. the de

[Numpy-discussion] issue #1431 accessing multiple fields in a recarray

2010-06-27 Thread sam tygier
Hello A while ago there was a discussion about field order when accessing recarrays. eg: >>> x = np.array([(1.5,2.5,(1.0,2.0)),(3.,4.,(4.,5.)),(1.,3.,(2.,6.))], dtype=[('x','f4'),('y',np.float32),('value','f4',(2,2))]) >>> x[['x','y']] array([(1.5, 2.5), (3.0, 4.0), (1.0, 3.0)], d

Re: [Numpy-discussion] Documentation for dtypes with named fields

2010-03-16 Thread Sam Tygier
On Tue, Mar 16, 2010 at 12:23 PM, gmail.com> wrote: > You can file a ticket, but if this is a function that is already in > real use, then it would be an unpleasant break in the API done http://projects.scipy.org/numpy/ticket/1431 thanks Sam ___ NumP

Re: [Numpy-discussion] Documentation for dtypes with named fields

2010-03-16 Thread Sam Tygier
On Tue, Mar 16, 2010 at 11:34 AM, Skipper Seabold wrote: >> so i always get the vales back in the original order. is the by design, or a >> bug? >> > > I've been bitten by this before too and asked the same question with > no response. I think it's just a limitation of the design of > structured

Re: [Numpy-discussion] Documentation for dtypes with named fields

2010-03-16 Thread Sam Tygier
Thanks for those responses. could the dtype pages in the numpy reference link to the basics.rec page in the user guide? there seem to be some gotchas in list within a list notation. if i have a = array([0,0.1,0.2,0.3,0.4]) b = array((0,0.1,0.2,0.3,0.4), dtype=[('a','f'), ('b','f'), ('c','f'),

[Numpy-discussion] Documentation for dtypes with named fields

2010-03-16 Thread Sam Tygier
Hello I can't find much documentation for using arrays where the dtype has named fields (is there a term for this sort of array). there is some in http://docs.scipy.org/doc/numpy/reference/arrays.dtypes.html http://docs.scipy.org/doc/numpy/reference/generated/numpy.dtype.html but that's most crea

Re: [Numpy-discussion] dtype for a single char

2010-03-04 Thread sam tygier
Robert Kern wrote: > On Thu, Mar 4, 2010 at 02:34, sam tygier wrote: >> Robert Kern wrote: >>> On Wed, Mar 3, 2010 at 15:14, sam tygier wrote: >>>> Hello >>>> >>>> today i was caught out by trying to use 'a' as a dtype for a singl

Re: [Numpy-discussion] combinatorics

2010-03-04 Thread Sam Tygier
itertools in the python standard library has what you need >>> import itertools >>> list( itertools.product([4,5], [7,8,9]) ) [(4, 7), (4, 8), (4, 9), (5, 7), (5, 8), (5, 9)] (all the itertools functions return generators, so the list() is to convert it to a list) Sam __

Re: [Numpy-discussion] dtype for a single char

2010-03-04 Thread sam tygier
Robert Kern wrote: > On Wed, Mar 3, 2010 at 15:14, sam tygier wrote: >> Hello >> >> today i was caught out by trying to use 'a' as a dtype for a single >> character. a simple example would be: >> >>>>> array([('a',1),('b

[Numpy-discussion] dtype for a single char

2010-03-03 Thread sam tygier
Hello today i was caught out by trying to use 'a' as a dtype for a single character. a simple example would be: >>> array([('a',1),('b',2),('c',3)], dtype=[("letter", "a"), ("number", "i")]) array([('', 1), ('', 2), ('', 3)], dtype=[('letter', '|S0'), ('number', '>> array([('a',1),('b',2)

Re: [Numpy-discussion] read ascii file with quote delimited strings

2010-02-26 Thread Sam Tygier
On Fri, 2010-02-26 at 07:56 +, numpy-discussion-requ...@scipy.org wrote: > Date: Thu, 25 Feb 2010 13:56:43 -0800 > From: Chris Barker > Subject: Re: [Numpy-discussion] read ascii file with quote delimited > strings > To: Discussion of Numerical Python > Message-ID: <4b86f21b.5070...@n