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] 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

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] 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

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

2009-11-08 Thread Fernando Perez
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? I tried introspecting in various parts of np.linalg (down to the 'bare' lapack_lite functions) and could

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

2009-11-07 Thread Sturla Molden
Jake VanderPlas wrote: > Does anybody know a > way to directly access the numpy.linalg routines from a C extension, > without the overhead of a python callback? Thanks for the help. > You find a C function pointer wrapped in a CObject in the ._cpointer attribute. _

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

2009-11-07 Thread Jake VanderPlas
Hello, I'm working on wrapping a set of C++ routines for manifold learning (LLE, Isomap, LTSA, etc) in python. In the LLE routine, it is necessary to loop through the input points and perform an svd of each local covariance matrix. Presently I have my own C-LAPACK wrapper that I call within a C l