Skip to content

bloqade.geometry.dialects.grid.shift

← Module overview

functionshiftsource

bloqade.geometry.dialects.grid.shift

Signature
def shift(grid: Grid[Nx, Ny], x_shift: float, y_shift: float) -> Grid[Nx, Ny]

Shift a grid in the x and y directions.

Returns: Grid: a new grid object that has been shifted

Parameters

NameTypeDescription
gridGrid[Nx, Ny]a grid object
x_shiftfloatshift in the x direction
y_shiftfloatshift in the y direction

Returns

Grid[Nx, Ny]

source