This is an explanation for the issue Erwin Kalvelagen mentioned in his blog post.
When you add an arbitrary object to a numpy array, numpy tries to add that object to every element of the array which is known as broadcasting.
Here, for example, when you add a pulp.LpVariable
to a numpy array, it is added to every element of the array:
In [36]: arr = np.array([1, 2, 3])
In [37]: x = pulp.LpVariable('x')