[SciPy-User] [scipy-user] How to add a 1D np.array to another np.array?

Fabien Lafont lafont.fabien@gmail....
Wed Feb 1 10:21:08 CST 2012


Hello everyone,

I try to add an array to another (to build a 2D array).

I try that



a = np.zeros(2)
b=np.array([2,4])
a[[0]] = b

print a
[2,0]

And I want a= [[2,4],0]

How can I do?
Thx
Fabien


More information about the SciPy-User mailing list