[Numpy-discussion] [f2py] Adding custom code in module initialization code
Mon Aug 13 04:47:47 CDT 2007
David Cournapeau wrote:
> Pearu Peterson wrote:
>> On Mon, August 13, 2007 8:43 am, David Cournapeau wrote:
>>> I would like to know if it is possible to tell f2py to call some
>>> functions inside the initialization function of a module ? I found a
>>> mention to add some function to the module function list, but nothing
>>> about the initialization function.
>> Yes, it is possible. Look for `usercode` statement in
>> In particular, see the `Extended F2PY usage` section for an example.
> I see how to use usercode to add C function to the module, but how to
> tell f2py to call a given C function in the init* function ? For
> example, let's say I have a module foo, and I want the function init_foo
> to call the function bar() ?
Sorry, it was in front of my eyes for sometimes, and I didn't see it.
More information about the Numpy-discussion