Coverage for src/foapy/ma/_intervals_tuple.py: 100%
3 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-17 19:57 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-17 19:57 +0000
1from foapy.core._intervals_tuple import intervals_tuple as core_intervals_tuple
4def intervals_tuple(chain, binding: int, tuple_mode: int):
5 """
6 Apply a boundary handling strategy to an intervals chain.
8 Delegates directly to :func:`foapy.core.intervals_tuple`. Chain values
9 are never masked, so no masked-array handling is needed.
11 Parameters
12 ----------
13 chain : array_like
14 A 1-D intervals chain (plain ndarray).
15 binding : int
16 ``binding.start`` (1) — chain was produced left-to-right.
17 ``binding.end`` (2) — chain was produced right-to-left.
18 tuple_mode : int
19 ``tuple_mode.lossy``, ``tuple_mode.normal``, or
20 ``tuple_mode.redundant``.
22 Returns
23 -------
24 ndarray
25 Plain 1-D integer array of boundary-adjusted intervals.
26 """
27 return core_intervals_tuple(chain, binding, tuple_mode)