def _make_grid(dtype, grid_spec):
rng = np.random.RandomState(<NUM_LIT:0>)<EOL>num_points = np.prod(grid_spec.shape)<EOL>grid = np.linspace(grid_spec.min, grid_spec.max, num=num_points).astype(dtype)<EOL>grid_spacing = (grid_spec.max - grid_spec.min) / num_points<EOL>grid += <NUM_LIT:0.1> * grid_spacing * rng.randn(*grid.shape)<EOL>grid = np.sort(grid)<EOL>return np.reshape(grid, grid_spec.shape)<EOL>
Returns a uniform grid + noise, reshaped to shape argument.