Skip to content

bloqade.geometry.dialects.grid.scale

← Module overview

functionscalesource

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

NameTypeDescription
gridGrid[Nx, Ny]a grid object
x_scalefloatscaling factor in the x direction
y_scalefloatscaling factor in the y direction

Returns

Grid[Nx, Ny]

source