Re: [Numpy-discussion] Accessing LAPACK and BLAS from the numpy C API

2009-11-09 Thread Robert Kern
On Tue, Nov 10, 2009 at 02:43, Fernando Perez wrote: > On Sun, Nov 8, 2009 at 11:43 PM, David Cournapeau > wrote: >> Fernando Perez wrote: >>> On Sat, Nov 7, 2009 at 12:41 PM, Sturla Molden wrote: >>> You find a C function pointer wrapped in a CObject in the ._cpointer attribute.

Re: [Numpy-discussion] Accessing LAPACK and BLAS from the numpy C API

2009-11-09 Thread Fernando Perez
On Sun, Nov 8, 2009 at 11:43 PM, David Cournapeau wrote: > Fernando Perez wrote: >> On Sat, Nov 7, 2009 at 12:41 PM, Sturla Molden wrote: >> >>> You find a C function pointer wrapped in a CObject in the ._cpointer >>> attribute. >>> >> >> Sorry, in the ._cpointer attribute of what precisely? > >

Re: [Numpy-discussion] Vector interpolation on a 2D grid (with realistic results)

2009-11-09 Thread Scott Sinclair
>2009/11/8 Pierre GM : > Chris, I gonna poke around and try to find some kriging algorithms. > I'll report in a few. In the meantime, if anybody has anythng already > implemented, please just let us know. A little late with the reply. I've used gstat (http://www.gstat.org/) in two ways 1) by runn

Re: [Numpy-discussion] Use-case for np.choose

2009-11-09 Thread josef . pktd
On Mon, Nov 9, 2009 at 7:59 PM, wrote: > On Mon, Nov 9, 2009 at 7:54 PM, David Goldsmith > wrote: >> May I infer from the sudden silence that I finally have it? > > I think so, > I assume that the result of broadcasting is unique, I haven't seen an > example yet where broadcasting would depend

Re: [Numpy-discussion] Use-case for np.choose

2009-11-09 Thread josef . pktd
On Mon, Nov 9, 2009 at 7:54 PM, David Goldsmith wrote: > May I infer from the sudden silence that I finally have it? I think so, I assume that the result of broadcasting is unique, I haven't seen an example yet where broadcasting would depend on the sequence in which it is done. Josef > > DG >

Re: [Numpy-discussion] Use-case for np.choose

2009-11-09 Thread David Goldsmith
May I infer from the sudden silence that I finally have it? DG On Sun, Nov 8, 2009 at 8:50 PM, David Goldsmith wrote: > OK, let me see if I'm interpreting this example correctly: > > >>> c1=np.arange(2).reshape(2,1,1); c1 > array([[[0]], > >[[1]]]) > >>> c2=2+np.arange(2).reshape(1,1,2);

Re: [Numpy-discussion] Release notes for arraysetops changes

2009-11-09 Thread Pauli Virtanen
ma, 2009-11-09 kello 23:13 +, Neil Crighton kirjoitti: > I've written some release notes (below) describing the changes to > arraysetops.py. If someone with commit access could check that these sound ok > and add them to the release notes file, that would be great. Thanks, added! Paul

Re: [Numpy-discussion] Accessing LAPACK and BLAS from the numpy C API

2009-11-09 Thread David Cournapeau
On Tue, Nov 10, 2009 at 4:08 AM, Jake VanderPlas wrote: >>The safe way to access them, since they are not exposed, is to call the >>function at the python level in your C code, but I don't think that's >>what you want, > > I want to avoid calling functions at the python level, because of the > ove

[Numpy-discussion] Release notes for arraysetops changes

2009-11-09 Thread Neil Crighton
Hi, I've written some release notes (below) describing the changes to arraysetops.py. If someone with commit access could check that these sound ok and add them to the release notes file, that would be great. Cheers, Neil New features Improved set operations ~~

Re: [Numpy-discussion] Extremely bizarre behavior I just cant track down...

2009-11-09 Thread Chris Colbert
This problem is solved. Lisandro spent a bunch of time with me helping to track it down. Thanks Lisandro! On Mon, Nov 9, 2009 at 6:49 PM, Chris Colbert wrote: > I've got an issue where trying to pass a numpy array to one of my > cython functions fails, with the exception saying than 'int object

Re: [Numpy-discussion] Accessing LAPACK and BLAS from the numpy C API

2009-11-09 Thread Jake VanderPlas
>The safe way to access them, since they are not exposed, is to call the >function at the python level in your C code, but I don't think that's >what you want, I want to avoid calling functions at the python level, because of the overhead for multiple calls within nested loops. I may have a solut

Re: [Numpy-discussion] initializing an array of lists

2009-11-09 Thread Pauli Virtanen
Sat, 07 Nov 2009 21:56:29 -0600, alan wrote: > I want to build a 2D array of lists, and so I need to initialize the > array with empty lists : > > myarray = array([[[],[],[]] ,[[],[],[]]]) > > Is there a clever way to do this? I could define the array > > myarray = zeros( (xdim,ydim), dtype=obje

Re: [Numpy-discussion] initializing an array of lists

2009-11-09 Thread Robert Kern
On Mon, Nov 9, 2009 at 12:00, Christopher Barker wrote: > a...@ajackson.org wrote: >> myarray = zeros( (xdim,ydim), dtype=object) >> and then iterate through the elements initializing then to empty lists, but >> surely there is a better way. > > I tried this: > > In [3]: a = np.empty((2,3), dtype=

Re: [Numpy-discussion] initializing an array of lists

2009-11-09 Thread Christopher Barker
a...@ajackson.org wrote: > myarray = zeros( (xdim,ydim), dtype=object) > and then iterate through the elements initializing then to empty lists, but > surely there is a better way. I tried this: In [3]: a = np.empty((2,3), dtype=np.object) In [5]: a[:,:] = [] but got: ValueError: shape mismat

[Numpy-discussion] Extremely bizarre behavior I just cant track down...

2009-11-09 Thread Chris Colbert
I've got an issue where trying to pass a numpy array to one of my cython functions fails, with the exception saying than 'int objects are not iterable'. So somehow, my array is going from being perfectly ok (i can display the image and print its shape and size), to going bad right before the funct

Re: [Numpy-discussion] Who is ariver and why does it keep making test commits?

2009-11-09 Thread Robert Kern
On Mon, Nov 9, 2009 at 09:08, Charles R Harris wrote: > Just curious, but there have been a lot of test commits to numpy svn by > ariver of the form: > > --- a/trunk/TEST_COMMIT > +++ b/trunk/TEST_COMMIT > @@ -15,3 +15,3 @@ > tim_hochberg: yes > > jarrod.millman: yes > -ariver: 2009.11.04.17.33.

[Numpy-discussion] Who is ariver and why does it keep making test commits?

2009-11-09 Thread Charles R Harris
Just curious, but there have been a lot of test commits to numpy svn by ariver of the form: --- a/trunk/TEST_COMMIT +++ b/trunk/TEST_COMMIT @@ -15,3 +15,3 @@ tim_hochberg: yes jarrod.millman: yes -ariver: 2009.11.04.17.33.56 +ariver: 2009.11.09.08.30.47 Which are 1) pointless, and 2) look almos

Re: [Numpy-discussion] f2py function callback: error while using repeated arguments in function call

2009-11-09 Thread Pearu Peterson
Yves Frederix wrote: > Hi, > > I am doing a simple function callback from fortran to python for which > the actual function call in fortran has repeated arguments. > > ! callback_error.f90: > subroutine testfun(x) >double precision, intent(in) :: x >double precision :: y > !f2py intent(c

Re: [Numpy-discussion] Vector interpolation on a 2D grid (with realistic results)

2009-11-09 Thread Pierre GM
On Nov 7, 2009, at 9:14 PM, Ryan May wrote: > On Sat, Nov 7, 2009 at 5:38 PM, Pierre GM > wrote: >> Linear interpolation with the delaunay package doesn't work great for >> my data. I played with the radial basis functions, but I'm afraid >> they're leading me down the dark, dark path of param

Re: [Numpy-discussion] Accessing LAPACK and BLAS from the numpy C API

2009-11-09 Thread David Cournapeau
Fernando Perez wrote: > On Sat, Nov 7, 2009 at 12:41 PM, Sturla Molden wrote: > >> You find a C function pointer wrapped in a CObject in the ._cpointer >> attribute. >> > > Sorry, in the ._cpointer attribute of what precisely? If Sturla refers to CObject as defined in the python C API, t