gridpoints 1.0.4__tar.gz → 1.0.6__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.
- {gridpoints-1.0.4 → gridpoints-1.0.6}/PKG-INFO +2 -2
- {gridpoints-1.0.4 → gridpoints-1.0.6}/README.md +1 -1
- {gridpoints-1.0.4 → gridpoints-1.0.6}/pyproject.toml +1 -1
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/griddemo/__init__.py +1 -1
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints/__init__.py +1 -1
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints/mlg_sort.py +17 -16
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints.egg-info/PKG-INFO +2 -2
- {gridpoints-1.0.4 → gridpoints-1.0.6}/LICENSE +0 -0
- {gridpoints-1.0.4 → gridpoints-1.0.6}/setup.cfg +0 -0
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/griddemo/quick_demo.py +0 -0
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints/array_libs.py +0 -0
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints/diagonal_tricks.py +0 -0
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints/kdtree.py +0 -0
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints.egg-info/SOURCES.txt +0 -0
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints.egg-info/dependency_links.txt +0 -0
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints.egg-info/requires.txt +0 -0
- {gridpoints-1.0.4 → gridpoints-1.0.6}/src/gridpoints.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gridpoints
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: fast multidimensional sorting tool for point clouds using the monotonic lagrangian grid
|
|
5
5
|
Author: Armand de Cacqueray
|
|
6
6
|
License: MIT
|
|
@@ -42,7 +42,7 @@ NaNs and Infs are supported in a consistent manner:
|
|
|
42
42
|
|
|
43
43
|
This allow to gridsort prime or variable number of points N, as long as one is ready to deal with void/special grid cells.
|
|
44
44
|
|
|
45
|
-
Expected runtime for sorting 1 million points: CPU → < 10s, GPU → < 500 ms
|
|
45
|
+
Expected runtime for sorting 1 million points: CPU → < 10s (numpy), GPU → < 500 ms (torch cuda)
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
@@ -26,7 +26,7 @@ NaNs and Infs are supported in a consistent manner:
|
|
|
26
26
|
|
|
27
27
|
This allow to gridsort prime or variable number of points N, as long as one is ready to deal with void/special grid cells.
|
|
28
28
|
|
|
29
|
-
Expected runtime for sorting 1 million points: CPU → < 10s, GPU → < 500 ms
|
|
29
|
+
Expected runtime for sorting 1 million points: CPU → < 10s (numpy), GPU → < 500 ms (torch cuda)
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gridpoints"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.6"
|
|
8
8
|
description = "fast multidimensional sorting tool for point clouds using the monotonic lagrangian grid "
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -18,7 +18,7 @@ from .kdtree import kdtree_order
|
|
|
18
18
|
# Sorting API
|
|
19
19
|
# ============================================
|
|
20
20
|
|
|
21
|
-
def argsort(X, gridshape, level=2, init="kdtree", n_iter=40
|
|
21
|
+
def argsort(X, gridshape, verbose = 2, level=2, init="kdtree", n_iter=40):
|
|
22
22
|
"""Compute a multi-directional monotonic sorted ordering of a point cloud.
|
|
23
23
|
|
|
24
24
|
Parameters
|
|
@@ -33,6 +33,8 @@ def argsort(X, gridshape, level=2, init="kdtree", n_iter=40, verbose = 2):
|
|
|
33
33
|
Note: Point clouds can be padded with +/- infinity placeholders to reach
|
|
34
34
|
a valid grid size. NaNs can also be used, but will be placed randomly
|
|
35
35
|
rather than pushed to grid boundaries.
|
|
36
|
+
verbose : int, default 2
|
|
37
|
+
0 = silent, 1 = log progress, 2 = 1 + warn if convergence failed
|
|
36
38
|
level : {1, 2, 3}, default=2
|
|
37
39
|
Maximum order of lattice directions considered. Higher values improve
|
|
38
40
|
grid quality at the expense of computational speed. Note that `level=3`
|
|
@@ -42,8 +44,6 @@ def argsort(X, gridshape, level=2, init="kdtree", n_iter=40, verbose = 2):
|
|
|
42
44
|
if the point cloud is already nearly sorted.
|
|
43
45
|
n_iter : int, default=40
|
|
44
46
|
Maximum number of optimization iterations.
|
|
45
|
-
verbose : int, default 2
|
|
46
|
-
0 = silent, 1 = log progress, 2 = 1 + warn if convergence failed
|
|
47
47
|
|
|
48
48
|
Returns
|
|
49
49
|
-------
|
|
@@ -79,21 +79,22 @@ def argsort(X, gridshape, level=2, init="kdtree", n_iter=40, verbose = 2):
|
|
|
79
79
|
X[order], gridshape, level=level, n_iter=n_iter, verbose = verbose
|
|
80
80
|
)
|
|
81
81
|
order = order[ordernew]
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
if not converged and verbose >=2:
|
|
83
|
+
warnings.warn(
|
|
84
|
+
f"Algorithm failed to converge after {n_iter} iterations.\n " \
|
|
85
|
+
"Consider checking if the grid structure is already suitable \n" \
|
|
86
|
+
"for the given task, which is higly probable, or increase the \n" \
|
|
87
|
+
"`n_iter` parameter if strict convergence is required.\n" \
|
|
88
|
+
"(to shutup this warning, run the sort with verbose <= 1)",
|
|
89
|
+
category=ConvergenceWarning,
|
|
90
|
+
stacklevel=2
|
|
91
|
+
)
|
|
91
92
|
if verbose:
|
|
92
93
|
print("done")
|
|
93
94
|
return order
|
|
94
95
|
|
|
95
96
|
|
|
96
|
-
def sort(X, gridshape, level=2, init="kdtree", inplace=False, n_iter=40
|
|
97
|
+
def sort(X, gridshape, verbose = 2, level=2, init="kdtree", inplace=False, n_iter=40):
|
|
97
98
|
"""Sort a point cloud `X` using the monotonic Lagrangian algorithm.
|
|
98
99
|
|
|
99
100
|
Parameters
|
|
@@ -108,6 +109,8 @@ def sort(X, gridshape, level=2, init="kdtree", inplace=False, n_iter=40, verbose
|
|
|
108
109
|
Note: Point clouds can be padded with +/- infinity placeholders to reach
|
|
109
110
|
a valid grid size. NaNs can also be used, but will be placed randomly
|
|
110
111
|
rather than pushed to grid boundaries.
|
|
112
|
+
verbose : int, default 2
|
|
113
|
+
0 = silent, 1 = log progress, 2 = 1 + warn if convergence failed
|
|
111
114
|
level : {1, 2, 3}, default=1
|
|
112
115
|
Maximum order of lattice directions considered. Higher values improve
|
|
113
116
|
grid quality at the expense of computational speed. Note that `level=3`
|
|
@@ -119,8 +122,6 @@ def sort(X, gridshape, level=2, init="kdtree", inplace=False, n_iter=40, verbose
|
|
|
119
122
|
If True, modify the point cloud `X` in place.
|
|
120
123
|
n_iter : int, default=40
|
|
121
124
|
Maximum number of optimization iterations.
|
|
122
|
-
verbose : int, default 2
|
|
123
|
-
0 = silent, 1 = log progress, 2 = 1 + warn if convergence failed
|
|
124
125
|
|
|
125
126
|
Returns
|
|
126
127
|
-------
|
|
@@ -128,7 +129,7 @@ def sort(X, gridshape, level=2, init="kdtree", inplace=False, n_iter=40, verbose
|
|
|
128
129
|
The sorted point cloud such that `X_sorted.reshape(*shape, D)` forms a
|
|
129
130
|
monotonically sorted grid. Returns `None` if `inplace=True`.
|
|
130
131
|
"""
|
|
131
|
-
order = argsort(X, gridshape, level=level, init = init, n_iter=n_iter
|
|
132
|
+
order = argsort(X, gridshape, verbose = verbose, level=level, init = init, n_iter=n_iter)
|
|
132
133
|
|
|
133
134
|
if inplace:
|
|
134
135
|
X[:] = X[order]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gridpoints
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.6
|
|
4
4
|
Summary: fast multidimensional sorting tool for point clouds using the monotonic lagrangian grid
|
|
5
5
|
Author: Armand de Cacqueray
|
|
6
6
|
License: MIT
|
|
@@ -42,7 +42,7 @@ NaNs and Infs are supported in a consistent manner:
|
|
|
42
42
|
|
|
43
43
|
This allow to gridsort prime or variable number of points N, as long as one is ready to deal with void/special grid cells.
|
|
44
44
|
|
|
45
|
-
Expected runtime for sorting 1 million points: CPU → < 10s, GPU → < 500 ms
|
|
45
|
+
Expected runtime for sorting 1 million points: CPU → < 10s (numpy), GPU → < 500 ms (torch cuda)
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|