I came across this code fragment and can't understand what is happening here.
X = np.linspace(-5,5,50)
Y = np.linspace(-5,5,50)
X, Y = np.meshgrid(X,Y)
pos = np.empty(X.shape+(2,))
Why is (2,)
necessary here and how does Python interpret half empty tuples like that in general?