align_index

static DataProviderLinked.align_index(index: int, target_axis: ArrayLike, tolerance: float, method: Literal['nearest', 'backward', 'forward']) int[source]

Align an index on a target axis.

Parameters:
  • index (int) – The index to align.

  • target_axis (ArrayLike) – The axis to align the index on.

  • tolerance (float) – The alignment tolerance.

  • method (Literal["nearest", "backward", "forward"]) – The alignment method.

Returns:

The aligned index.

Return type:

int