[Numpy-discussion] Finding many ways to incorrectly create a numpy array. Please advice
Wed Aug 3 10:50:11 CDT 2011
On 8/2/11 1:40 PM, Jeremy Conlin wrote:
> Thanks for that information. It helps greatly in understanding what is
> happening. Next time I'll put my data into tuples.
I don't remember where they all are, but there are a few places in numpy
where tuples and lists are interpreted differently (fancy indexing?). It
kind of breaks python "duck typing" (a sequence is a sequence), but it's
So when a list fails to do what you want, try a tuple.
Christopher Barker, Ph.D.
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
More information about the NumPy-Discussion