summaryrefslogtreecommitdiff
path: root/numpy/f2py/docs/usersguide/calculate.f
blob: 1cda1c8ddd3d4fd31f581420426feb4bb1ee3ee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
      subroutine calculate(x,n)
cf2py intent(callback) func
      external func
c     The following lines define the signature of func for F2PY:
cf2py real*8 y
cf2py y = func(y)
c
cf2py intent(in,out,copy) x
      integer n,i
      real*8 x(n)
      do i=1,n
         x(i) = func(x(i))
      end do
      end