summaryrefslogtreecommitdiff
path: root/doc/source/f2py/code
diff options
context:
space:
mode:
authormelissawm <melissawm.github@gmail.com>2021-12-15 12:21:54 -0300
committermelissawm <melissawm.github@gmail.com>2022-01-05 14:13:10 -0300
commit9867da9994a2f0dbfdec412fbb7d77032cb27e42 (patch)
tree05ffb52231adc9dcdcff4f73e9b2ca38278adf00 /doc/source/f2py/code
parent4a6f65f10ab65307a9e1118f61d3504a7eca9de1 (diff)
downloadnumpy-9867da9994a2f0dbfdec412fbb7d77032cb27e42.tar.gz
Responding to review comments
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..a1c375996
--- /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..f12b6560b
--- /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..c3002fd25
--- /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..6a2a8533d
--- /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..a23e2d9b1
--- /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..c1af805c2
--- /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*8 dimension(:),intent(in) :: c
+ real*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..0576fb888
--- /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*8 dimension(:),intent(in) :: c
+ real*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