summaryrefslogtreecommitdiff
path: root/doc/source/f2py/code
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source/f2py/code')
-rw-r--r--doc/source/f2py/code/add-edited.pyf6
-rw-r--r--doc/source/f2py/code/add-improved.f16
-rw-r--r--doc/source/f2py/code/add.f11
-rw-r--r--doc/source/f2py/code/add.pyf6
-rw-r--r--doc/source/f2py/code/filter.f19
-rw-r--r--doc/source/f2py/code/myroutine-edited.pyf17
-rw-r--r--doc/source/f2py/code/myroutine.f9010
-rw-r--r--doc/source/f2py/code/myroutine.pyf17
8 files changed, 102 insertions, 0 deletions
diff --git a/doc/source/f2py/code/add-edited.pyf b/doc/source/f2py/code/add-edited.pyf
new file mode 100644
index 000000000..4d2047274
--- /dev/null
+++ b/doc/source/f2py/code/add-edited.pyf
@@ -0,0 +1,6 @@
+subroutine zadd(a,b,c,n) ! in :add:add.f
+ double complex dimension(n) :: a
+ double complex dimension(n) :: b
+ double complex intent(out),dimension(n) :: c
+ integer intent(hide),depend(a) :: n=len(a)
+end subroutine zadd \ No newline at end of file
diff --git a/doc/source/f2py/code/add-improved.f b/doc/source/f2py/code/add-improved.f
new file mode 100644
index 000000000..65f70c9bc
--- /dev/null
+++ b/doc/source/f2py/code/add-improved.f
@@ -0,0 +1,16 @@
+C
+ SUBROUTINE ZADD(A,B,C,N)
+C
+CF2PY INTENT(OUT) :: C
+CF2PY INTENT(HIDE) :: N
+CF2PY DOUBLE COMPLEX :: A(N)
+CF2PY DOUBLE COMPLEX :: B(N)
+CF2PY DOUBLE COMPLEX :: C(N)
+ DOUBLE COMPLEX A(*)
+ DOUBLE COMPLEX B(*)
+ DOUBLE COMPLEX C(*)
+ INTEGER N
+ DO 20 J = 1, N
+ C(J) = A(J) + B(J)
+ 20 CONTINUE
+ END \ No newline at end of file
diff --git a/doc/source/f2py/code/add.f b/doc/source/f2py/code/add.f
new file mode 100644
index 000000000..5e7556b28
--- /dev/null
+++ b/doc/source/f2py/code/add.f
@@ -0,0 +1,11 @@
+C
+ SUBROUTINE ZADD(A,B,C,N)
+C
+ DOUBLE COMPLEX A(*)
+ DOUBLE COMPLEX B(*)
+ DOUBLE COMPLEX C(*)
+ INTEGER N
+ DO 20 J = 1, N
+ C(J) = A(J)+B(J)
+ 20 CONTINUE
+ END
diff --git a/doc/source/f2py/code/add.pyf b/doc/source/f2py/code/add.pyf
new file mode 100644
index 000000000..d2583e333
--- /dev/null
+++ b/doc/source/f2py/code/add.pyf
@@ -0,0 +1,6 @@
+subroutine zadd(a,b,c,n) ! in :add:add.f
+ double complex dimension(*) :: a
+ double complex dimension(*) :: b
+ double complex dimension(*) :: c
+ integer :: n
+end subroutine zadd \ No newline at end of file
diff --git a/doc/source/f2py/code/filter.f b/doc/source/f2py/code/filter.f
new file mode 100644
index 000000000..fb44343fa
--- /dev/null
+++ b/doc/source/f2py/code/filter.f
@@ -0,0 +1,19 @@
+C
+ SUBROUTINE DFILTER2D(A,B,M,N)
+C
+ DOUBLE PRECISION A(M,N)
+ DOUBLE PRECISION B(M,N)
+ INTEGER N, M
+CF2PY INTENT(OUT) :: B
+CF2PY INTENT(HIDE) :: N
+CF2PY INTENT(HIDE) :: M
+ DO 20 I = 2,M-1
+ DO 40 J = 2,N-1
+ B(I,J) = A(I,J) +
+ & (A(I-1,J)+A(I+1,J) +
+ & A(I,J-1)+A(I,J+1) )*0.5D0 +
+ & (A(I-1,J-1) + A(I-1,J+1) +
+ & A(I+1,J-1) + A(I+1,J+1))*0.25D0
+ 40 CONTINUE
+ 20 CONTINUE
+ END
diff --git a/doc/source/f2py/code/myroutine-edited.pyf b/doc/source/f2py/code/myroutine-edited.pyf
new file mode 100644
index 000000000..14e455416
--- /dev/null
+++ b/doc/source/f2py/code/myroutine-edited.pyf
@@ -0,0 +1,17 @@
+! -*- f90 -*-
+! Note: the context of this file is case sensitive.
+
+python module myroutine ! in
+ interface ! in :myroutine
+ subroutine s(n,m,c,x) ! in :myroutine:myroutine.f90
+ integer intent(in) :: n
+ integer intent(in) :: m
+ real(kind=8) dimension(:),intent(in) :: c
+ real(kind=8) dimension(n,m),intent(out) :: x
+ end subroutine s
+ end interface
+end python module myroutine
+
+! This file was auto-generated with f2py (version:1.23.0.dev0+120.g4da01f42d).
+! See:
+! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e \ No newline at end of file
diff --git a/doc/source/f2py/code/myroutine.f90 b/doc/source/f2py/code/myroutine.f90
new file mode 100644
index 000000000..592796a6a
--- /dev/null
+++ b/doc/source/f2py/code/myroutine.f90
@@ -0,0 +1,10 @@
+subroutine s(n, m, c, x)
+ implicit none
+ integer, intent(in) :: n, m
+ real(kind=8), intent(out), dimension(n,m) :: x
+ real(kind=8), intent(in) :: c(:)
+
+ x = 0.0d0
+ x(1, 1) = c(1)
+
+end subroutine s \ No newline at end of file
diff --git a/doc/source/f2py/code/myroutine.pyf b/doc/source/f2py/code/myroutine.pyf
new file mode 100644
index 000000000..ef8f16789
--- /dev/null
+++ b/doc/source/f2py/code/myroutine.pyf
@@ -0,0 +1,17 @@
+! -*- f90 -*-
+! Note: the context of this file is case sensitive.
+
+python module myroutine ! in
+ interface ! in :myroutine
+ subroutine s(n,m,c,x) ! in :myroutine:myroutine.f90
+ integer intent(in) :: n
+ integer intent(in) :: m
+ real(kind=8) dimension(:),intent(in) :: c
+ real(kind=8) dimension(n,m),intent(out),depend(m,n) :: x
+ end subroutine s
+ end interface
+end python module myroutine
+
+! This file was auto-generated with f2py (version:1.23.0.dev0+120.g4da01f42d).
+! See:
+! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e \ No newline at end of file