[Numpy-discussion] [f2py] Adding custom code in module initialization code

Pearu Peterson pearu@cens.ioc...
Mon Aug 13 00:57:59 CDT 2007


On Mon, August 13, 2007 8:43 am, David Cournapeau wrote:
> Hi,
>
>     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

  http://cens.ioc.ee/projects/f2py2e/usersguide/index.html

In particular, see the `Extended F2PY usage` section for an example.

HTH,
Pearu



More information about the Numpy-discussion mailing list