fpfind 3.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
fpfind/lib/typing.py ADDED
@@ -0,0 +1,27 @@
1
+ import os
2
+ from typing import Iterator, List, Tuple, Union
3
+
4
+ import numpy as np
5
+ from numpy.typing import NDArray
6
+ from typing_extensions import TypeAlias
7
+
8
+ from fpfind import NP_PRECISEFLOAT
9
+
10
+ Number: TypeAlias = Union[int, float, np.integer, np.floating]
11
+ Integer: TypeAlias = Union[int, np.integer]
12
+ Float: TypeAlias = Union[float, np.floating]
13
+ Complex_: TypeAlias = Union[np.complex64, np.complex128, np.complex256]
14
+ Complex: TypeAlias = Union[complex, Complex_]
15
+
16
+ NumberArray: TypeAlias = Union[NDArray[np.number], List[Number]]
17
+ IntegerArray: TypeAlias = Union[NDArray[np.integer], List[Integer]]
18
+ FloatArray: TypeAlias = Union[NDArray[np.floating], List[Float]]
19
+ ComplexArray: TypeAlias = Union[NDArray[Complex_], List[Complex]]
20
+
21
+ TimestampArray: TypeAlias = NDArray[Union[NP_PRECISEFLOAT, np.uint64]]
22
+ DetectorArray: TypeAlias = NDArray[np.uint32]
23
+ TimestampDetectorArray: TypeAlias = Tuple[TimestampArray, DetectorArray]
24
+ TimestampDetectorStream: TypeAlias = Iterator[TimestampDetectorArray]
25
+
26
+ PathLike: TypeAlias = Union[os.PathLike, str]
27
+ Mask: TypeAlias = NDArray[np.bool_]