[Numpy-discussion] Accessing LAPACK and BLAS from the numpy C API
Tue Nov 10 01:50:25 CST 2009
On Tue, Nov 10, 2009 at 02:43, Fernando Perez <email@example.com> wrote:
> On Sun, Nov 8, 2009 at 11:43 PM, David Cournapeau
> <firstname.lastname@example.org> wrote:
>> Fernando Perez wrote:
>>> On Sat, Nov 7, 2009 at 12:41 PM, Sturla Molden <email@example.com> wrote:
>>>> You find a C function pointer wrapped in a CObject in the ._cpointer
>>> Sorry, in the ._cpointer attribute of what precisely?
>> If Sturla refers to CObject as defined in the python C API, then the
>> underlying lapack functions are not wrapped into a C object (this is not
>> done automatically). The lapack_lite functions such as dgeev and co are
>> standard python function (with *self and *args args, i.e. wrappers
>> around the underlying 'true' lapack function).
> Thanks, David. My question was because Sturla's language seemed to
> suggest (at least it did to me) that there was some python object foo
> where foo._cpointer would be a poniter to the raw C function one could
> then manipulate with ctypes. Perhaps I just misunderstood, but thanks
> for clarifying that at least this isn't possible today from pure
Only f2py functions have the ._cpointer attribute.
In : from scipy import linalg
In : linalg.flapack.dgeev._cpointer
Out: <PyCObject at 0x3435500>
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the NumPy-Discussion