I noticed something unusual with a code I wrote that I didn't understand.
The problem was to plot a contour plot in python. Here is the code I wrote(Which is mistakenly wrong since I have to pass the plt.contour() instead of plt.plot()):
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
def f(x,y):
return (x**2+y**2)/np.sqrt(x**2+y**2)
x=np.linspace(0,1,11)
y=np.linspace(0,1,11)
X,Y=np.meshgrid(x,y)
z=f(X,Y)
print(np.shape(z))
plt.plot(x,y,z)
plt.show()
Now, I though that this programme would throw an error since x and y are 1-D array and z is 11×11 array. However,to my surprise it didn't. Instead it plotted the curves as shown below: 
I checked the official documentation and according to it,this call is perfectly allowed. However, the trouble part is I don't know what the code actually did. Why are the curves actually plotted like the one in figure given below? There is no mention in official documentation that how such call to the function works. Can someone explain what this code actually did? I have hard time understanding this.
