Error: The number of dimensions in the constraint for i must match the number in the array.