From: Konrad H. <hi...@cn...> - 2002-11-19 13:28:51
|
> No. I want to set the memory zone of the array but once this zone is > set, I want numpy to manage it as if it was owner of the memory. That is the most frequent case for which there is no clean solution. There ought to be an array constructor that takes a pointer to a deallocation function which is called to free the data space. You can do myarray->flags |= OWN_DATA, then the data space will be freed using the standard free() function. But this is undocumented, and works only if the standard OS memory allocation calls were used to allocate the memory. Konrad. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hi...@cn... Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- |