Generate a 1D array with length n, which spans [-0.5,0.5] with 0 at position n/2. See also docs for numpy.mgrid.
n – length of array to be generated
1D numpy array