[f2py] integers = 2226756?

"Michael Colonno" <mcolonno-FGKo4X94FMn2fBVCVOL8/[email protected]> Wed, 23 Mar 2011 20:16:12 -0700
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
            Hi ~

 

            I have what I hope is a very simple issue with integers. My
extremely simple F90 code: 

 

subroutine test(N) 

 

    implicit none

 

!f2py integer, intent(in) :: N

    integer                 :: N

 

    print *, "N = ", N

 

end subroutine

            

            I compile this with F2PY and get in Python:

 

>>> import test

>>> test.test(13)

N =      2226756

>>> N = 7

>>> test.test(N)

N =      2226756

 

I get the same value for any value I input. If I change the argument N to a
real, I get the correct value. Is there some kind of incompatibility re:
integers from Python? Please let me know if I'm going crazy. 

 

            Thanks,

            ~Mike C.

_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
http://cens.ioc.ee/mailman/listinfo/f2py-users