[Numpy-discussion] concatenate and different numbers of dimensions

Evan Mason evanmason@gmail....
Mon Feb 12 17:55:00 CST 2007


Hi, I am trying to use concatenate to join together a 40x50x45 array and a
50x45 array.  The shape of the resulting array should be 41x50x45.

In [132]: tempLevel.shape
Out[132]: (40, 50, 45)

In [133]: temp.shape
Out[133]: (50, 45)

I've tried various ways to do this using concatenate but always get the
following:

In [142]: concatenate((tempLevel, temp), axis=0)
---------------------------------------------------------------------------
exceptions.ValueError                                Traceback (most recent
call last)

/home/emason/python/tools/<ipython console>

ValueError: arrays must have same number of dimensions


How do I do this with concatenate, or is there another way to do it?

Many thanks, Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070212/dec5663d/attachment.html 


More information about the Numpy-discussion mailing list