ValueError: all the input arrays must have same number of dimensions
If I start with a 3×4 array, and concatenate a 3×1 array, with axis 1, I get a 3×5 array: Note that both inputs to concatenate have 2 dimensions. Omit the :, and x[:,-1] is (3,) shape – it is 1d, and hence the error: The code for np.append is (in this case where axis is specified) So with a … Read more