Copy operator (was list.remove for Noivces)
Chris Barker
chrishbarker at home.net
Thu Nov 29 19:56:19 EST 2001
Mark Fardal wrote:
> > b = a.copy()
>
> Not available in Python 1.5.2, as you feared. Does it behave differently
> than b = copy.copy(a) ?
Probably not.
> > In the 7th paragraph of "Array Basics" in my copy of the docs, it says:
> > "functions which return arrays which are simply differnt views of the
> > same data will in fact share their data" This applies to slices, but I
> > agree that that is not made clear AT ALL in that section of the docs.
>
> Hm, the quoted criterion seems more than slightly circular to me.
> How does it tell you that copy.copy(a) makes a copy of the data, but
> a[:] does not?
It doesn't. All it tells you is that you need to be careful about when
Numeric is making a copy, and when it's not. As I said, this needs more
documentation.
By the way, Numeric2 has been introduced in an early form, and I don't
know if any of this is changing, but maybe we can make an effort to make
it clear in the new docs.
-Chris
--
Christopher Barker,
Ph.D.
ChrisHBarker at home.net --- --- ---
http://members.home.net/barkerlohmann ---@@ -----@@ -----@@
------@@@ ------@@@ ------@@@
Oil Spill Modeling ------ @ ------ @ ------ @
Water Resources Engineering ------- --------- --------
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------
More information about the Python-list
mailing list