В ipython может кто -то использовать функцию Fortran в коде Python, с таким образом: < /p>
%load_ext fortranmagic
< /code>
%%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
< /code>
print(f1(22))
< /code>
Is there any similar way to use a C++ function with %%cpp ??
Подробнее здесь: https://stackoverflow.com/questions/724 ... -cpp-magic