[Numpy-discussion] loading and filtering data for matplotlib

2010-10-26 Thread Resmi
Hi I'm new to python. I'm trying to plot a data set in matplotlib. The data is a mixture of strings and floats, has four columns (col[0],col[1],col[2],col[3]) and it looks like: R -2.29350 0.50340 0.480E-01 R -2.25903 0.50740 0.480E-01 SU -2.19457 0.16200 0.800E-01

Re: [Numpy-discussion] loading and filtering data for matplotlib

2010-10-26 Thread josef . pktd
On Tue, Oct 26, 2010 at 10:57 AM, Resmi l.re...@gmail.com wrote: Hi  I'm new to python. I'm trying to plot a data set in matplotlib.  The data is a mixture of strings and floats, has four columns (col[0],col[1],col[2],col[3]) and it looks like: R       -2.29350   0.50340   0.480E-01 R      

Re: [Numpy-discussion] portable doctests despite floating points numbers

2010-10-26 Thread Fabrice Silva
Another solution http://code.activestate.com/recipes/577124-approximately-equal/ -- Fabrice Silva ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] loading and filtering data for matplotlib

2010-10-26 Thread Resmi
the vectorized version that should work (minus typos, just written not tested) filt = data['filt'] mask = filt=='SU' x1=data['x1'][mask] SUx2 = data['x2'][mask] no loop necessary. T hanks Josef. It works as it is. Resmi ___ NumPy-Discussion

[Numpy-discussion] problems with numdifftools

2010-10-26 Thread Nicolai Heitz
Hey, I am not sure if you are the right persons to contact but if not I would appreciate a short notice and maybe an address where I can find help. I already posted this this message in an other python mailing list and they forwarded me to this list and told me that I might find help here. I

Re: [Numpy-discussion] problems with numdifftools

2010-10-26 Thread Pauli Virtanen
Tue, 26 Oct 2010 12:16:53 -0700, Nicolai Heitz wrote: I am not sure if you are the right persons to contact but if not I would appreciate a short notice and maybe an address where I can find help. I already posted this this message in an other python mailing list and they forwarded me to this

Re: [Numpy-discussion] problems with numdifftools

2010-10-26 Thread josef . pktd
On Tue, Oct 26, 2010 at 3:28 PM, Pauli Virtanen p...@iki.fi wrote: Tue, 26 Oct 2010 12:16:53 -0700, Nicolai Heitz wrote: I am not sure if you are the right persons to contact but if not I would appreciate a short notice and maybe an address where I can find help. I already posted this this

Re: [Numpy-discussion] problems with numdifftools

2010-10-26 Thread Nicolai Heitz
Am 26.10.2010 12:38, schrieb josef.p...@gmail.com: On Tue, Oct 26, 2010 at 3:28 PM, Pauli Virtanenp...@iki.fi wrote: Tue, 26 Oct 2010 12:16:53 -0700, Nicolai Heitz wrote: I am not sure if you are the right persons to contact but if not I would appreciate a short notice and maybe an

Re: [Numpy-discussion] problems with numdifftools

2010-10-26 Thread Pauli Virtanen
Tue, 26 Oct 2010 14:24:39 -0700, Nicolai Heitz wrote: http://mail.scipy.org/mailman/listinfo/scipy-user I contacted them already but they didn't responded so far and I was forwarded to that list which was supposed to be more appropriated. I think you are thinking here about some other list

[Numpy-discussion] Stacking a 2d array onto a 3d array

2010-10-26 Thread Dewald Pieterse
Starting with: In [93]: test = numpy.array([[[1,1,1],[1,1,1]],[[2,2,2],[2,2,2]],[[3,3,3],[3,3,3]]]) In [94]: test Out[94]: array([[[1, 1, 1], [1, 1, 1]], [[2, 2, 2], [2, 2, 2]], [[3, 3, 3], [3, 3, 3]]]) Slicing the complete first row: In [95]:

Re: [Numpy-discussion] Stacking a 2d array onto a 3d array

2010-10-26 Thread josef . pktd
On Tue, Oct 26, 2010 at 8:15 PM, Dewald Pieterse dewald.piete...@gmail.com wrote: Starting with: In [93]: test = numpy.array([[[1,1,1],[1,1,1]],[[2,2,2],[2,2,2]],[[3,3,3],[3,3,3]]]) In [94]: test Out[94]: array([[[1, 1, 1],     [1, 1, 1]],    [[2, 2, 2],     [2, 2, 2]],   

Re: [Numpy-discussion] Stacking a 2d array onto a 3d array

2010-10-26 Thread Dewald Pieterse
I see my slicing was the problem, np.vstack((test[:1], test)) works perfectly. On Wed, Oct 27, 2010 at 12:55 AM, josef.p...@gmail.com wrote: On Tue, Oct 26, 2010 at 8:15 PM, Dewald Pieterse dewald.piete...@gmail.com wrote: Starting with: In [93]: test =

[Numpy-discussion] adding 'order=' keyword arg to ravel and others

2010-10-26 Thread Mark Wiebe
Because writing arr.ravel('F') doesn't seem as descriptive as arr.ravel(order='F'), I wrote this simple patch. I added mention of the order='A' parameter to a few places it is relevant as well. Here's the branch on github: http://github.com/m-paradox/numpy/compare/master...ravel_keyword_arg