bloqade.geometry.dialects.grid.scale
← Module overview
function
source
functionscale¶source
bloqade.geometry.dialects.grid.scale
Signature
def scale(grid: Grid[Nx, Ny], x_scale: float, y_scale: float) -> Grid[Nx, Ny]Scale a grid in the x and y directions.
Returns: Grid: a new grid object that has been scaled
Parameters
| Name | Type | Description |
|---|---|---|
grid | Grid[Nx, Ny] | a grid object |
x_scale | float | scaling factor in the x direction |
y_scale | float | scaling factor in the y direction |
Returns
Grid[Nx, Ny]