[Numpy-discussion] List of arrays
Christopher Barker
Chris.Barker at noaa.gov
Mon May 11 17:52:29 EDT 2009
Wei Su wrote:
> The codes do not work. Guess you forgot something there.
l wasn't defined:
In [16]: a = np.arange(10)
In [17]: b = np.arange(5)
In [20]: l = [a,b]
In [21]: l
Out[21]: [array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), array([0, 1, 2, 3, 4])]
In [22]: np.concatenate(l)
Out[22]: array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4])
-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
More information about the NumPy-Discussion
mailing list