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

1from foapy.core._intervals_tuple import intervals_tuple as core_intervals_tuple 

2 

3 

4def intervals_tuple(chain, binding: int, tuple_mode: int): 

5 """ 

6 Apply a boundary handling strategy to an intervals chain. 

7 

8 Delegates directly to :func:`foapy.core.intervals_tuple`. Chain values 

9 are never masked, so no masked-array handling is needed. 

10 

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``. 

21 

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)