concatenate trouble

Jan. 30, 2009
4:26 p.m.
What's the problem here? print np.concatenate (np.ones (10, dtype=complex), np.zeros (10, dtype=complex)) TypeError: only length-1 arrays can be converted to Python scalars

January 2009
4:28 p.m.
Neal Becker wrote:
What's the problem here?
print np.concatenate (np.ones (10, dtype=complex), np.zeros (10, dtype=complex)) TypeError: only length-1 arrays can be converted to Python scalars
You should enclose the arrays you concatenate into a tuple: np.concatenate((a,b)). r.
6014
Age (days ago)
6014
Last active (days ago)
1 comments
2 participants
participants (2)
-
Neal Becker
-
Robert Cimrman