I have two types of results named idcs
a) idcs is a 2D numpy array
print(idcs[0:3,:])
[[ 147. -696. -1000. ..., 2275. 2718. 2206.]
[ 140. -599. -999. ..., 1824. 1982. 2084.]
[ -528. -291. 441. ..., -189. 522. 942.]]
b) idcs is a 1D ndarray object of numpy arrays (different data here)
print(idcs[0:3])
[ array([ -20.95406189, 54.04593811, 136.04593811, ..., -4.95406189,
-88.95406189, -87.95406189])
array([ 24.49842377, 11.49842377, -17.50157623, ..., -100.50157623,
-121.50157623, -106.50157623])
array([ 460.3249115, 411.3249115, 124.3249115, ..., -79.6750885,
-72.6750885, 97.3249115])]
I want to convert the output of type b) into type a). How to do this? Using np.vstack did NOT work:
ValueError: all the input array dimensions except for the concatenation axis must match exactly
Thanks, Heinz