Server IP : 192.158.238.246 / Your IP : 18.222.209.172 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib64/python3.11/site-packages/numpy/f2py/tests/src/size/ |
Upload File : |
subroutine foo(a, n, m, b) implicit none real, intent(in) :: a(n, m) integer, intent(in) :: n, m real, intent(out) :: b(size(a, 1)) integer :: i do i = 1, size(b) b(i) = sum(a(i,:)) enddo end subroutine subroutine trans(x,y) implicit none real, intent(in), dimension(:,:) :: x real, intent(out), dimension( size(x,2), size(x,1) ) :: y integer :: N, M, i, j N = size(x,1) M = size(x,2) DO i=1,N do j=1,M y(j,i) = x(i,j) END DO END DO end subroutine trans subroutine flatten(x,y) implicit none real, intent(in), dimension(:,:) :: x real, intent(out), dimension( size(x) ) :: y integer :: N, M, i, j, k N = size(x,1) M = size(x,2) k = 1 DO i=1,N do j=1,M y(k) = x(i,j) k = k + 1 END DO END DO end subroutine flatten