Skip to content

Commit e26b7a0

Browse files
authored
Merge pull request #153 from static-frame/152/trimap
2 parents bf83c1c + d31eeb2 commit e26b7a0

File tree

7 files changed

+1856
-48
lines changed

7 files changed

+1856
-48
lines changed

requirements-build-3_08.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements-dev-3_08.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# pylint: disable=C0414
44

55
from ._arraykit import __version__
6+
from ._arraykit import TriMap as TriMap
67
from ._arraykit import ArrayGO as ArrayGO
78
from ._arraykit import BlockIndex as BlockIndex
89
from ._arraykit import ErrorInitTypeBlocks as ErrorInitTypeBlocks

src/__init__.pyi

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class ErrorInitTypeBlocks(RuntimeError):
3232
def __setstate__(self) -> None: ...
3333

3434
class ArrayGO:
35-
3635
values: np.ndarray
3736
def __init__(
3837
self, iterable: tp.Iterable[object], *, own_iterable: bool = ...
@@ -45,6 +44,28 @@ class ArrayGO:
4544
def copy(self: _T) -> _T: ...
4645
def extend(self, __values: tp.Iterable[object]) -> None: ...
4746

47+
class TriMap:
48+
def __init__(self, src_len: int, dst_len: int) -> None: ...
49+
def __repr__(self) -> str: ...
50+
def register_one(self, src_from: int, dst_from: int) -> None: ...
51+
def register_unmatched_dst(self) -> None: ...
52+
def register_many(self, src_from: int, dst_from: np.ndarray) -> None: ...
53+
def is_many(self) -> bool: ...
54+
def src_no_fill(self) -> bool: ...
55+
def dst_no_fill(self) -> bool: ...
56+
def map_src_no_fill(self, array_from: np.ndarray) -> np.ndarray: ...
57+
def map_dst_no_fill(self, array_from: np.ndarray) -> np.ndarray: ...
58+
def map_src_fill(self,
59+
array_from: np.ndarray,
60+
fill_value: tp.Any,
61+
fill_value_dtype: np.dtype
62+
) -> np.ndarray: ...
63+
def map_dst_fill(self,
64+
array_from: np.ndarray,
65+
fill_value: tp.Any,
66+
fill_value_dtype: np.dtype
67+
) -> np.ndarray: ...
68+
4869
class BlockIndex:
4970
shape: tp.Tuple[int, int]
5071
dtype: np.dtype

0 commit comments

Comments
 (0)