[f2py] array reference

<[email protected]> Thu, 5 Aug 2010 10:21:32 +0200
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
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