make_uniform_grid
- hcipy.field.make_uniform_grid(dims, extent, center=0, has_center=False, xp=None)[source]
Create a uniformly-spaced
Gridof a certain shape and size.- Parameters:
- dimsint or tuple of ints
The number of points in each dimension. If this is a scalar, it will be multiplexed over all dimensions.
- extentscalar or array_like
The total extent of the grid in each dimension.
- centerscalar or array_like
The center point. The grid will by symmetric around this point.
- has_centerboolean
Does the grid has to have the center as one of its points. If this is False, this does not mean that the grid will not have the center.
- xpmodule, optional
The array namespace to use. If you’re using old-style Fields, this must be Numpy. If you’re using new-style Fields and don’t provide this, it will be attempted to be inferred from extent/center.
- Returns:
- Grid
A
GridwithRegularCoords.
- Raises:
- ValueError
If xp cannot be inferred and using new-style Fields.