[NumPy-Tickets] [NumPy] #1532: f2py does not respect assumed size arrays of fortran 90
NumPy Trac
numpy-tickets@scipy....
Mon Feb 28 13:15:35 CST 2011
#1532: f2py does not respect assumed size arrays of fortran 90
--------------------------+-------------------------------------------------
Reporter: ozn | Owner: pearu
Type: enhancement | Status: reopened
Priority: normal | Milestone: Unscheduled
Component: numpy.f2py | Version: devel
Resolution: | Keywords:
--------------------------+-------------------------------------------------
Comment(by lorenz):
Thanks, with the newest version of your branch the "use" module statements
are working fine now - almost:
I noticed, that
{{{
use foomodule, only : bar
}}}
is somehow translated to
{{{
use foomdule,,only: bar
}}}
that is with two ","
An Actual example:
test3.f90:
{{{
subroutine assumed_shape_test(x, res)
use precision, only : rk
implicit none
real(kind=rk), intent(in) :: x(:)
real(kind=rk), intent(out) :: res
integer :: i
print *, "size(x) = ", size(x)
res = 0.0
do i = 1, size(x)
res = x(i)
enddo
end subroutine
}}}
f2py generated test3-f2pywrappers.f:
{{{
C -*- fortran -*-
C This file is autogenerated with f2py (version:2)
C It contains Fortran 77 wrappers to fortran functions.
subroutine f2pywrapassumed_shape_test (x, res, f2py_x_d0)
use precision,,only: rk
real(kind=rk) res
integer f2py_x_d0
real(kind=rk) x(f2py_x_d0)
interface
subroutine assumed_shape_test(x,res)
use precision,,only: rk
real(kind=rk) ,intent(in),dimension(:) :: x
real(kind=rk) ,intent(out) :: res
end subroutine assumed_shape_test
end interface
call assumed_shape_test(x, res)
end
}}}
(Again, I inserted two spaces before and after the comma.)
Kind regards,
Lorenz
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1532#comment:11>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list