How to concatenate these numpy
arrays?
first np.array
with a shape (5,4)
[[ 6487 400 489580 0]
[ 6488 401 492994 0]
[ 6491 408 489247 0]
[ 6491 408 489247 0]
[ 6492 402 499013 0]]
second np.array
with a shape (5,)
[ 16. 15. 12. 12. 17. ]
final result should be
[[ 6487 400 489580 0 16]
[ 6488 401 492994 0 15]
[ 6491 408 489247 0 12]
[ 6491 408 489247 0 12]
[ 6492 402 499013 0 17]]
I tried np.concatenate([array1, array2])
but i get this error
ValueError: all the input arrays must have same number of dimensions
What am I doing wrong?
(1,)
? Is there some sort of weird thing with object arrays going on here? - user2357112 supports Monicaarray2 = np.array(np.round(data[:,0]/20))
- RaduS