summaryrefslogtreecommitdiff
path: root/doc/source/f2py/code/calculate.f
diff options
context:
space:
mode:
authorGagandeep Singh <gdp.1807@gmail.com>2021-11-02 11:28:17 +0530
committerGagandeep Singh <gdp.1807@gmail.com>2021-11-02 11:28:17 +0530
commitc04509e86e97a69a0b5fcbeebdbec66faad3dbe0 (patch)
treeb5940db3ad46e55b88d566ec058007dc3c6b7e72 /doc/source/f2py/code/calculate.f
parent56647dd47345a7fd24b4ee8d9d52025fcdc3b9ae (diff)
parentfae6fa47a3cf9b9c64af2f5bd11a3b644b1763d2 (diff)
downloadnumpy-c04509e86e97a69a0b5fcbeebdbec66faad3dbe0.tar.gz
resolved conflicts
Diffstat (limited to 'doc/source/f2py/code/calculate.f')
-rw-r--r--doc/source/f2py/code/calculate.f14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/source/f2py/code/calculate.f b/doc/source/f2py/code/calculate.f
new file mode 100644
index 000000000..4ff570d28
--- /dev/null
+++ b/doc/source/f2py/code/calculate.f
@@ -0,0 +1,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), func
+ do i=1,n
+ x(i) = func(x(i))
+ end do
+ end