[Matrix-SIG] extending an array

hinsen@dirac.cnrs-orleans.fr hinsen@dirac.cnrs-orleans.fr
Thu, 6 Jan 2000 14:59:11 +0100


> Is it possible to extend an array "in place"?

No.

> Reshape does not do that but resize creates always a copy.
> Is there something that behaves like a C realloc?

Even C realloc doesn't guarantee an extension in place; it might as well
allocate a new memory block and copy the data. I suppose one could somehow
provide access to the realloc operation in NumPy, but I am not sure that
it makes much sense.

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------