Error: all the input array dimensions except for the concatenation axis must match exactly

You are stacking 1D arrays as columns to make a 2D array. So, all of the arrays passed to concatenate must have shape (n, ), where the value of n must be the same for all your arguments. Clearly, in your case this does not happen. Find which argument(s) doesn’t fit and remove it.

Leave a Comment