sequince.utils.bounds#
Functions#
|
Check if particles are within the specified bounds. |
Module Contents#
- sequince.utils.bounds.in_bounds(particles, bounds, xp=None)[source]#
Check if particles are within the specified bounds.
Bounds are assumed to be rectilinear, with shape (2, n_dimensions).
- Parameters:
particles (sequince.typing.Array) – Array of shape (n_particles, n_dimensions) representing the particles.
bounds (sequince.typing.Array) – Array of shape (2, n_dimensions) where bounds[0] are the lower bounds and bounds[1] are the upper bounds for each dimension.
xp (Any | None)
- Returns:
Boolean array of shape (n_particles,) indicating whether each particle is within bounds.
- Return type:
Array