1

In Ipython can someone use a FORTRAN function in python code,with this way:

%load_ext fortranmagic
%%fortran 
subroutine f1(x, z)
    real, intent(in) :: x
    real, intent(out) :: z
    integer :: i
    do i=1,10000
        z = 1000*sin(x+i)
    enddo
end subroutine f1
print(f1(22))

Is there any similar way to use a C++ function with %%cpp ??

0 Answers0