uvex_transients.phase_space.space.Space.grid#

Space.grid(size: int | Sequence[int], bounds: ArrayLike | None = None) → NDArray[float64][source]#

Lay out a regular grid of points, with the first axis varying slowest.

Parameters:
  • size (int or sequence of int) – Points per axis, one number for every axis or a sequence with one for each. At least 2.

  • bounds (array-like, optional) – The rectangle to cover, shape (ndim, 2), which can differ from the ranges of the axes. By default the ranges of the axes.

Returns:

The grid points, shape (prod(size), ndim), in the order of numpy.meshgrid(..., indexing="ij") flattened, so that reshaping a column to size gives that axis laid out over the grid.

Return type:

numpy.ndarray

Raises:

ValueError – If size or bounds does not match the space.