xt = np.random.random((10, 1))
print('X shape:', X.shape)
print('xt shape:', xt.shape)
print('Stacked shape:', np.hstack((X, xt)).shape)
Numpy hstack - "ValueError: all the input arrays must have same number of dimensions" - but they do