连接两个具有相同行的numpy数组:我遇到了ValueError

The first array is (5074382, 82) and the second is (5074382, 9276434) I tried:

features_final = np.column_stack((features2, features_encoded))

features_encoded.shape

(5074382, 9276434)

features2.shape

(5074382, 82)

The complete Jupyter Notebook: https://safenote.co/r/5ea2f0da1f0ab3@46165431 I got the error:

ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 5074382 and the array at index 1 has size 1

发生了什么?如何解决?

评论