Gabor Kalman
2013-03-02 19:55:46 UTC
I hope that I can save someones time with the following message:
I wrote a small script in gfortran:
!-----------------------
file: RK4-test.f90
module aa
subroutine RK4(args) !!!please note RK4 is in all CAPS
...
end subroutine RK4
....
end module aa
!------------------------------------
then compiled it into lib1.pyd
then with the f2py driver:
#------------------------------
test.py
import lib1
s=lib1.aa.RK4(args)
print s
#------------------------------
I got an obscure message: AttributeError in RK4
After a lot of searches I was ready to give up,
but then I ACCIDENTLY Ire-wrote the driver as:
#-------------------------------------------
test.py
import lib1
s=lib1.aa.rk4(args) !!!please note rk4 in LOWER-CASE
print s
#----------------------------------------
and SUDDENLY everything worked OK!!!!
Yes, while I know Python is case-sensitive, but this still surprised me.
I wrote a small script in gfortran:
!-----------------------
file: RK4-test.f90
module aa
subroutine RK4(args) !!!please note RK4 is in all CAPS
...
end subroutine RK4
....
end module aa
!------------------------------------
then compiled it into lib1.pyd
then with the f2py driver:
#------------------------------
test.py
import lib1
s=lib1.aa.RK4(args)
print s
#------------------------------
I got an obscure message: AttributeError in RK4
After a lot of searches I was ready to give up,
but then I ACCIDENTLY Ire-wrote the driver as:
#-------------------------------------------
test.py
import lib1
s=lib1.aa.rk4(args) !!!please note rk4 in LOWER-CASE
print s
#----------------------------------------
and SUDDENLY everything worked OK!!!!
Yes, while I know Python is case-sensitive, but this still surprised me.