ndgrid returns vectors in a matrix by default, but input kwarg of vector=False, and you can return the matrices.