I want to change the "status" of a numpy array.
I mean this array was created by a server application using 
PyArray_FromDimsAndData that sets the NPY_OWNDATA flag to False.

The server application believes the client would free the memory.
But there are more than one client application and none knows who is in charge 
of freeing this memory.
Then I want to set the flag NPY_OWNDATA to True to tell the server to do the 
job when it finishes the script.

How can I do that, I mean at the Python interface level, not the C API.

>>> print a.flags.owndata
True
>>>
>>> a.flags.owndata=False
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
TypeError: attribute 'owndata' of 'numpy.flagsobj' objects is not writable
>>>

Or should I have to write my own function set/get for OWNDATA ?
The get is there but I can't get the set...

-MP-
-----------------------------------------------------------------------
  Marc POINOT [ONERA/DSNA] Tel:+33.1.46.73.42.84  Fax:+33.1.46.73.41.66

  Avertissement/disclaimer http://www.onera.fr/onera-en/emails-terms


_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to