ialdev-maths 0.1.0__tar.gz → 0.2.1__tar.gz
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.
- ialdev_maths-0.2.1/PKG-INFO +62 -0
- ialdev_maths-0.2.1/README.md +42 -0
- {ialdev_maths-0.1.0 → ialdev_maths-0.2.1}/pyproject.toml +9 -1
- {ialdev_maths-0.1.0 → ialdev_maths-0.2.1}/src/iad/maths/hist.py +3 -3
- ialdev_maths-0.1.0/PKG-INFO +0 -19
- ialdev_maths-0.1.0/README.md +0 -3
- {ialdev_maths-0.1.0 → ialdev_maths-0.2.1}/src/iad/maths/__init__.py +0 -0
- {ialdev_maths-0.1.0 → ialdev_maths-0.2.1}/src/iad/maths/geom/__init__.py +0 -0
- {ialdev_maths-0.1.0 → ialdev_maths-0.2.1}/src/iad/maths/geom/plane.py +0 -0
- {ialdev_maths-0.1.0 → ialdev_maths-0.2.1}/src/iad/maths/geom/shapes.py +0 -0
- {ialdev_maths-0.1.0 → ialdev_maths-0.2.1}/src/iad/maths/regress.py +0 -0
- {ialdev_maths-0.1.0 → ialdev_maths-0.2.1}/tests/test_geometry.py +0 -0
- {ialdev_maths-0.1.0 → ialdev_maths-0.2.1}/tests/test_hist.py +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ialdev-maths
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: iad.maths — histograms, geometry, regression
|
|
5
|
+
Author: ipcoder
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: ialdev-core
|
|
9
|
+
Requires-Dist: numpy>=1.20.0
|
|
10
|
+
Requires-Dist: pandas>=1.3.0
|
|
11
|
+
Requires-Dist: numba>=0.55.0
|
|
12
|
+
Requires-Dist: scikit-learn>=1.0.0
|
|
13
|
+
Requires-Dist: pytest>=7.0.0 ; extra == "dev"
|
|
14
|
+
Requires-Dist: ialdev-vis ; extra == "dev"
|
|
15
|
+
Project-URL: Homepage, https://github.com/ipcoder/ialdev/tree/master/maths
|
|
16
|
+
Project-URL: Issues, https://github.com/ipcoder/ialdev/issues
|
|
17
|
+
Project-URL: Repository, https://github.com/ipcoder/ialdev
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
|
|
20
|
+
# ialdev-maths
|
|
21
|
+
|
|
22
|
+
Numerical helpers for the `iad` toolbox, published as `ialdev-maths` and imported as `iad.maths`.
|
|
23
|
+
|
|
24
|
+
Use this package for histogram statistics, sampling, geometry primitives, plane fitting, and regression helpers used by image/data workflows.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install ialdev-maths
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Requires Python `>=3.10`.
|
|
33
|
+
|
|
34
|
+
## Highlights
|
|
35
|
+
|
|
36
|
+
- Histogram tools: `Sampler`, `StatGather`, `StatGather2D`, `Hist2D`, and equal-bin statistics.
|
|
37
|
+
- Geometry primitives: `Vec2d`, `Rect`, `Pose`, ranges, and region checks.
|
|
38
|
+
- Plane utilities: plane fitting, axis IDs, and 3D plane representation.
|
|
39
|
+
- Regression helpers, including robust linear regression and an SVD plane estimator.
|
|
40
|
+
|
|
41
|
+
## Examples
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from iad.maths.geom.shapes import Rect, Vec2d
|
|
45
|
+
|
|
46
|
+
roi = Rect(Vec2d(10, 20), dim=Vec2d(100, 80))
|
|
47
|
+
inside = (25, 30) in roi
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from iad.maths.hist import Sampler, equal_bins_stats
|
|
52
|
+
|
|
53
|
+
sampler = Sampler(low=0, high=1, bins=16)
|
|
54
|
+
stats = equal_bins_stats(values, sampler, stats=True)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from iad.maths.regress import robust_linear_regression
|
|
59
|
+
|
|
60
|
+
coef, intercept = robust_linear_regression(x, y)
|
|
61
|
+
```
|
|
62
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# ialdev-maths
|
|
2
|
+
|
|
3
|
+
Numerical helpers for the `iad` toolbox, published as `ialdev-maths` and imported as `iad.maths`.
|
|
4
|
+
|
|
5
|
+
Use this package for histogram statistics, sampling, geometry primitives, plane fitting, and regression helpers used by image/data workflows.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install ialdev-maths
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Python `>=3.10`.
|
|
14
|
+
|
|
15
|
+
## Highlights
|
|
16
|
+
|
|
17
|
+
- Histogram tools: `Sampler`, `StatGather`, `StatGather2D`, `Hist2D`, and equal-bin statistics.
|
|
18
|
+
- Geometry primitives: `Vec2d`, `Rect`, `Pose`, ranges, and region checks.
|
|
19
|
+
- Plane utilities: plane fitting, axis IDs, and 3D plane representation.
|
|
20
|
+
- Regression helpers, including robust linear regression and an SVD plane estimator.
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
from iad.maths.geom.shapes import Rect, Vec2d
|
|
26
|
+
|
|
27
|
+
roi = Rect(Vec2d(10, 20), dim=Vec2d(100, 80))
|
|
28
|
+
inside = (25, 30) in roi
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from iad.maths.hist import Sampler, equal_bins_stats
|
|
33
|
+
|
|
34
|
+
sampler = Sampler(low=0, high=1, bins=16)
|
|
35
|
+
stats = equal_bins_stats(values, sampler, stats=True)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
from iad.maths.regress import robust_linear_regression
|
|
40
|
+
|
|
41
|
+
coef, intercept = robust_linear_regression(x, y)
|
|
42
|
+
```
|
|
@@ -4,11 +4,14 @@ build-backend = "flit_core.buildapi"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ialdev-maths"
|
|
7
|
-
version = "0.1
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "iad.maths — histograms, geometry, regression"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
license = {text = "MIT"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "ipcoder"}
|
|
14
|
+
]
|
|
12
15
|
dependencies = [
|
|
13
16
|
"ialdev-core",
|
|
14
17
|
"numpy>=1.20.0",
|
|
@@ -23,6 +26,11 @@ dev = [
|
|
|
23
26
|
"ialdev-vis",
|
|
24
27
|
]
|
|
25
28
|
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/ipcoder/ialdev/tree/master/maths"
|
|
31
|
+
Repository = "https://github.com/ipcoder/ialdev"
|
|
32
|
+
Issues = "https://github.com/ipcoder/ialdev/issues"
|
|
33
|
+
|
|
26
34
|
[tool.flit.module]
|
|
27
35
|
name = "iad.maths"
|
|
28
36
|
|
|
@@ -41,7 +41,7 @@ def pack_bit_arrays_64(arrays):
|
|
|
41
41
|
:param arrays:
|
|
42
42
|
:return: bit-packed array
|
|
43
43
|
"""
|
|
44
|
-
from iad.core.binary import align_type_bits
|
|
44
|
+
from iad.core.data.binary import align_type_bits
|
|
45
45
|
n = len(arrays)
|
|
46
46
|
shapes = [a.shape for a in arrays]
|
|
47
47
|
shape = shapes[0]
|
|
@@ -1198,11 +1198,11 @@ class StatGather2D:
|
|
|
1198
1198
|
case 'range':
|
|
1199
1199
|
slc = np.s_[self.samplers[0].below:-2, self.samplers[1].below:-2]
|
|
1200
1200
|
if self.hist.ndim == 3:
|
|
1201
|
-
slc =
|
|
1201
|
+
slc = (slice(None),) + slc
|
|
1202
1202
|
case 'nonan':
|
|
1203
1203
|
slc = np.s_[self.samplers[0].below:-1, self.samplers[1].below:-1]
|
|
1204
1204
|
if self.hist.ndim == 3:
|
|
1205
|
-
slc =
|
|
1205
|
+
slc = (slice(None),) + slc
|
|
1206
1206
|
case None | False:
|
|
1207
1207
|
pass
|
|
1208
1208
|
case _:
|
ialdev_maths-0.1.0/PKG-INFO
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: ialdev-maths
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: iad.maths — histograms, geometry, regression
|
|
5
|
-
Requires-Python: >=3.10
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
Requires-Dist: ialdev-core
|
|
8
|
-
Requires-Dist: numpy>=1.20.0
|
|
9
|
-
Requires-Dist: pandas>=1.3.0
|
|
10
|
-
Requires-Dist: numba>=0.55.0
|
|
11
|
-
Requires-Dist: scikit-learn>=1.0.0
|
|
12
|
-
Requires-Dist: pytest>=7.0.0 ; extra == "dev"
|
|
13
|
-
Requires-Dist: ialdev-vis ; extra == "dev"
|
|
14
|
-
Provides-Extra: dev
|
|
15
|
-
|
|
16
|
-
# maths
|
|
17
|
-
|
|
18
|
-
Histogram utilities, geometry primitives, and regression helpers extracted from algutils.
|
|
19
|
-
|
ialdev_maths-0.1.0/README.md
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|