我想使用f2py在三維中運行一個簡單的集成問題。 這調用Python代碼的Fortran代碼如下: #!/Library/Frameworks/EPD64.framework/Versions/Current/bin/python
import pymods as modules
import pygauleg as gauleg
import pyint as integrator
im
我有一個數組,它通過f2py從fortran子程序讀取爲一維數組。然後在蟒蛇,該數組被重塑: a=np.zeros(nx*ny*nz)
read_fortran_array(a)
a=a.reshape(nz,ny,nx) #in fortran, the order is a(nx,ny,nz), C/Python it is reversed
現在我想傳遞數組回到FORTRAN作爲3D