[Numpy-discussion] What am I missing about concatenate? (original) (raw)
Christopher Barker Chris.Barker at noaa.gov
Thu Jun 1 11:33:02 EDT 2006
- Previous message (by thread): [Numpy-discussion] Suggestions for NumPy
- Next message (by thread): [Numpy-discussion] Re: What am I missing about concatenate?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I want to take two (2,) arrays and put them together into one (2,2) array. I thought one of these would work:
N.concatenate(((1,2),(3,4)),0) array([1, 2, 3, 4]) N.concatenate(((1,2),(3,4)),1) array([1, 2, 3, 4])
Is this the best I can do?
N.concatenate(((1,2),(3,4))).reshape(2,2) array([[1, 2], [3, 4]])
Is it because the arrays I'm putting together are rank-1?
N.version '0.9.6'
-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
- Previous message (by thread): [Numpy-discussion] Suggestions for NumPy
- Next message (by thread): [Numpy-discussion] Re: What am I missing about concatenate?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]