Re: [Numpy-discussion] scalar recordarrays

2007-03-19 Thread Francesc Altet
El ds 17 de 03 del 2007 a les 18:53 -0400, en/na Matthew Koichi Grimes va escriure: I've found that if I have a record array of shape [] (i.e. a scalar recarray), I can't set its fields. recarr recarray((0.0, 0.0, 0.0), dtype=[('x', 'f8'), ('dx', 'f8'), ('delta', 'f8')])

Re: [Numpy-discussion] in place random generation

2007-03-19 Thread Travis Oliphant
Mark P. Miller wrote: Robert: Just a thought on this topic: Would it be possible for the Scipy folks to add a new module based solely off your old mtrand code (pre-broadcast)? I have to say that the mtrand code from numpy 0.9.8 has some excellent advantages over the core python random

Re: [Numpy-discussion] in place random generation

2007-03-19 Thread Robert Kern
Travis Oliphant wrote: I've just added a faster path through the random-number generators for scalar parameters to the SVN code tree. It would be great if those who use this could check to see if 1) it is correct 2) it is indeed faster for scalar parameters It's faster, certainly. I'll

Re: [Numpy-discussion] in place random generation

2007-03-19 Thread Charles R Harris
On 3/19/07, Travis Oliphant [EMAIL PROTECTED] wrote: Mark P. Miller wrote: Robert: Just a thought on this topic: Would it be possible for the Scipy folks to add a new module based solely off your old mtrand code (pre-broadcast)? I have to say that the mtrand code from numpy 0.9.8 has some

[Numpy-discussion] nd_image.affine_transform edge effects

2007-03-19 Thread James Turner
Thanks, Stefan. In [25]: import numpy as N In [26]: x = N.array([[4,3,8,1],[4,3,8,1.]]) In [27]: ndi.geometric_transform(x,shift,output_shape=(2,6),prefilter=False,order=0,cval=-1) Out[27]: array([[-1., 3., 8., 1., 8., -1.], [-1., 3., 8., 1., 8., -1.]]) Your example seems to

Re: [Numpy-discussion] scalar recordarrays

2007-03-19 Thread Matthew Koichi Grimes
Francesc Altet wrote: with a rank-0 'recarr', 'recarr.x' should return a rank-0 array (for consistency), but it doesn't: In [74]:recarr=numpy.rec.array((1.0, 0, 3), dtype) In [75]:recarr.x Out[75]:1.0 In [76]:type(recarr.x) Out[76]:type 'numpy.float64' While I find this inconsistent,

Re: [Numpy-discussion] Nonblocking Plots with Matplotlib

2007-03-19 Thread Christian K .
Hi Bill, I just tried ezplot and encountered some problems: In [1]: import ezplot In [2]: p = ezplot.Plotter() In [3]: p.plot([1,2,3],[1,4,9],marker='o') At this point a window pops up for a second, closes again and plot does not return. I'm running python 2.4.4 on kubuntu linux with wxPython

Re: [Numpy-discussion] Nonblocking Plots with Matplotlib

2007-03-19 Thread Christian
Bill Baxter wrote: On 3/20/07, Christian K. [EMAIL PROTECTED] wrote: Hi Bill, I just tried ezplot and encountered some problems: In [1]: import ezplot In [2]: p = ezplot.Plotter() In [3]: p.plot([1,2,3],[1,4,9],marker='o') At this point a window pops up for a second, closes again and