Re: calling C function from Python via f2py

From: Hatzopoulos, Nikolaos <hatzopou_at_nyahnyahspammersnyahnyah>
Date: Fri May 21 2010 - 12:08:10 MDT

What's the results if you replace the double variables to floats

--
Nikolaos Hatzopoulos - Research Associate
Chapman University
Center of Excellence in Applied, 
Computational and Fundamental Science 
web: http://forecast.chapman.edu
-----Original Message-----
From: pyngl-talk-bounces@ucar.edu on behalf of Matt Fearon
Sent: Fri 5/21/2010 10:58 AM
To: pyngl-talk@ucar.edu
Subject: calling C function from Python via f2py
 
Hello,
New to PyNGL. I am trying to use f2py to generate a wrapped C function
that I can call from Python (passing arguments to and from). I have
this almost working, but I receive trouble with "exp and pow" related
to C and some "pos (2) error" with one of my passed variables. My f2py
syntax is:
f2py -c -lm FFMCcalc.pyf FFMCcalc.c
Also, my 3 scripts are short and attached.
1. FFMCcalc.c, C function
2. FFMCcalc.pyf, wrapper file
3. test.py, short python code that calls C function
Any advice would greatly appreciated to get this working.
thanks,
Matt
_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Fri May 21 12:11:22 2010

This archive was generated by hypermail 2.1.8 : Fri Jul 02 2010 - 10:10:53 MDT