Skip to content

Commit

Permalink
Responding to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
melissawm committed Jan 5, 2022
1 parent 4a6f65f commit 9867da9
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 168 deletions.
6 changes: 6 additions & 0 deletions doc/source/f2py/code/add-edited.pyf
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions doc/source/f2py/code/add-improved.f
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions doc/source/f2py/code/add.f
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions doc/source/f2py/code/add.pyf
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions doc/source/f2py/code/filter.f
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions doc/source/f2py/code/myroutine-edited.pyf
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions doc/source/f2py/code/myroutine.f90
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions doc/source/f2py/code/myroutine.pyf
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 9867da9

Please sign in to comment.