Numeric question
Chris Barker
Chris.Barker at noaa.gov
Fri Apr 26 15:19:34 EDT 2002
Emile van Sebille wrote:
> OK. It's x. So let's build a contiguous x and try it again:
> >>> x = array(inputs[0][:])
or
x = inputs[0][:].copy()
The copy method isn't in the version of the docs I have, but it's very
handy and quite clear as to what it is doing.
or
x = inputs[0,:].copy()
Numpy arrays are N-dimensional, you might as well index them that way.
come to think of it, why not:
inputs[0].copy() ?
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (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
More information about the Python-list
mailing list