numpy array concatenate: “ValueError: all the input arrays must have same number of dimensions”
To use np.concatenate, we need to extend the second array to 2D and then concatenate along axis=1 – Alternatively, we can use np.column_stack that takes care of it – Sample run – If b is such that its a 1D array of dtype=object with a shape of (1,), most probably all of the data is contained in the only element in it, we need to flatten it out before concatenating. For … Read more