Skip to content

bloqade.geometry.dialects.grid.new

← Module overview

functionnewsource

bloqade.geometry.dialects.grid.new

Signature
def new(x_spacing: ilist.IList[float, typing.Any] | list[float], y_spacing: ilist.IList[float, typing.Any] | list[float], x_init: float, y_init: float) -> Grid[typing.Any, typing.Any]

Create a new grid with the given spacing and initial position.

Parameters

NameTypeDescription
x_spacingilist.IList[float, typing.Any] | list[float]The spacing in the x direction.
y_spacingilist.IList[float, typing.Any] | list[float]The spacing in the y direction.
x_initfloatThe initial position in the x direction.
y_initfloatThe initial position in the y direction.

Returns

Grid[typing.Any, typing.Any]Grid: A new grid object.

source