I meant it does exactly like your code, and it's not really hard to use actually.
http://docs.scipy.org/doc/numpy/reference/generated/numpy.mgrid.html