def _make_grid(dim=(11, 4)):
 (x, y) = (range(dim[0]), range(dim[1]))
 p = np.array([[[s, i] for s in x] for i in y], dtype=np.float32)
 p[:, 1::2, 1] += 0.5
 p = np.reshape(p, ((-1), 2), 'F')
 x_scale = (1.0 / (np.amax(p[:, 0]) - np.amin(p[:, 0])))
 y_scale = (1.0 / (np.amax(p[:, 1]) - np.amin(p[:, 1])))
 p *= (x_scale, (x_scale / 0.5))
 return p

def _make_grid ( dim = ( 11 , 4 ) ) : ( x , y ) = ( range ( dim [ 0 ] ) , range ( dim [ 1 ] ) ) p = np . array ( [ [ [ s , i ] for s in x ] for i in y ] , dtype = np . float32 ) p [ : , 1 : : 2 , 1 ] += 0.5 p = np . reshape ( p , ( ( - 1 ) , 2 ) , 'F' ) x_scale = ( 1.0 / ( np . amax ( p [ : , 0 ] ) - np . amin ( p [ : , 0 ] ) ) ) y_scale = ( 1.0 / ( np . amax ( p [ : , 1 ] ) - np . amin ( p [ : , 1 ] ) ) ) p *= ( x_scale , ( x_scale / 0.5 ) ) return p
this function generates the structure for an asymmetrical circle grid domain .