[f2py] array reference
Malte.Mauelshagen at dlr.de
Malte.Mauelshagen at dlr.de
Thu Aug 5 11:21:32 EEST 2010
Hello,
I have a fortran module which has an array as a global variable.
After wrapping, and importing my module by python i can acces that variable easily.
In my script, i have code like this:
#############################################################
import mymodule
a = mymodule.f2pyinterface.field #thats my field
b = a
print (a == mymodule.f2pyinterface.field) #True!
print (a is mymodule.f2pyinterface.field) #False!
print (a is b) #True!
###########################################################
Since my field is very huge i dont want to have two copies of it. My question is:
Is it possible to assign the reference (and not only the value) of my array to a python variable?
Thank you in Advance
Malte
-----------------------------------------------------------------------------
Deutsches Zentrum für Luft- und Raumfahrt e.V.
in der Helmholtz-Gemeinschaft
Ausbildung - Duale Hochschule Baden-Württemberg
Malte Mauelshagen
Lilienthalplatz 7
38108 Braunschweig
Tel.: 0531/295-2483
More information about the f2py-users
mailing list