[Numpy-discussion] np.array execution path

Sebastian Haase seb.haase at gmail.com
Mon Sep 24 13:45:53 EDT 2012


On Mon, Sep 24, 2012 at 7:09 PM, Chris Barker <chris.barker at noaa.gov> wrote:
> On Sat, Sep 22, 2012 at 1:00 PM, Sebastian Haase <seb.haase at gmail.com> wrote:
>> Oh,
>> is this actually documented - I knew that np.array would (by default)
>> only create copies as need ... but I never knew it would - if all fits
>> - even just return the original Python-object...
>
> was that a typo? is is "asarray" that returns the orignal object if it
> can. That's kin dof the point.

well, I have misread the original post ..... so never mind my question ...
- Sebastian Haase


>
> Perhaps the OP was confusing asarray() with .view(). IIUC, .view()
> will always create a new ndarray object, but will use the same
> internal data pointer.
>
> -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
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list