From: Rob <ro...@py...> - 2002-02-16 18:03:29
|
I hoped there might be a combo FORTRAN/Numpy hacker that might help me with this. I have the following statements in a FORTRAN routine that I am converting to Numpy. I am wondering how to handle the EQUIVALENCE statement. As I understand it, ARL1[1] should be equal to the first item in the memory block for AR1. But not knowing how FORTRAN allocates arrays, its hard to tell what to do in Numpy. I tried ARL1=ravel(AR1) but that didn't work. Similarly ARL=AR[:,1,1} didn't work. I'm lost. Thanks in advance for any help. Rob. #COMMON /GGRID/ AR1(11,10,4),AR2(17,5,4),AR3(9,8,4),EPSCF,DXA(3),& # &DYA(3),XSA(3),YSA(3),NXA(3),NYA(3 #DIMENSION ARL1(1), ARL2(1), ARL3(1) #EQUIVALENCE (ARL1,AR1), (ARL2,AR2), (ARL3,AR3), (XS2,XSA(2)), (YS3,YSA(3)) -- The Numeric Python EM Project www.pythonemproject.com |