[Numpy-discussion] memmory management question

Chris Barker chris.barker at noaa.gov
Thu Oct 31 11:52:46 EDT 2013


On Mon, Oct 28, 2013 at 6:25 AM, Pierre Haessig <pierre.haessig at crans.org>wrote:


> > a.base
>


> In this document, it is mentionned several time that slicing yields
> "views of the original data", but the .base attribute is not mentionned.
> Should it be or is it out-of-scope of the Indexing guide ?
>

Indeed, that is not the least bit "basic" numpy usage -- the "basic way to
do what you want is to keep the original array around in the first place --
i.e. give the slice a different name.

-Chris


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131031/d50506ed/attachment.html>


More information about the NumPy-Discussion mailing list