gridpoints 1.0.0__tar.gz → 1.0.2__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.0 → gridpoints-1.0.2}/PKG-INFO +2 -2
- {gridpoints-1.0.0 → gridpoints-1.0.2}/README.md +1 -1
- {gridpoints-1.0.0 → gridpoints-1.0.2}/pyproject.toml +1 -1
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/griddemo/__init__.py +1 -1
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/griddemo/quick_demo.py +8 -2
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/gridpoints/__init__.py +1 -1
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/gridpoints/array_libs.py +4 -1
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/gridpoints/mlg_sort.py +2 -0
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/gridpoints.egg-info/PKG-INFO +2 -2
- {gridpoints-1.0.0 → gridpoints-1.0.2}/LICENSE +0 -0
- {gridpoints-1.0.0 → gridpoints-1.0.2}/setup.cfg +0 -0
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/gridpoints/diagonal_tricks.py +0 -0
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/gridpoints/kdtree.py +0 -0
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/gridpoints.egg-info/SOURCES.txt +0 -0
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/gridpoints.egg-info/dependency_links.txt +0 -0
- {gridpoints-1.0.0 → gridpoints-1.0.2}/src/gridpoints.egg-info/requires.txt +0 -0
- {gridpoints-1.0.0 → gridpoints-1.0.2}/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.2
|
|
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
|
|
@@ -36,7 +36,7 @@ NaNs and Infs are supported in a consistent manner:
|
|
|
36
36
|
This allow to deal with prime or variable N, as long as one is ready to
|
|
37
37
|
deal with void/special grid cells.
|
|
38
38
|
|
|
39
|
-
Expected runtime for sorting 1 million points: CPU → < 10s, GPU → <
|
|
39
|
+
Expected runtime for sorting 1 million points: CPU → < 10s, GPU → < 500 ms
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
@@ -20,7 +20,7 @@ NaNs and Infs are supported in a consistent manner:
|
|
|
20
20
|
This allow to deal with prime or variable N, as long as one is ready to
|
|
21
21
|
deal with void/special grid cells.
|
|
22
22
|
|
|
23
|
-
Expected runtime for sorting 1 million points: CPU → < 10s, GPU → <
|
|
23
|
+
Expected runtime for sorting 1 million points: CPU → < 10s, GPU → < 500 ms
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
@@ -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.2"
|
|
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"
|
|
@@ -61,7 +61,10 @@ def show_result(X, animate=False):
|
|
|
61
61
|
print("Missing dependencies for the demo. pip install gridsort[demo]")
|
|
62
62
|
from squarenet import SquareNet
|
|
63
63
|
import numpy as np
|
|
64
|
-
|
|
64
|
+
try:
|
|
65
|
+
X = np.asarray(X)
|
|
66
|
+
except:
|
|
67
|
+
print("Array still on GPU, move it back to gpu first befor showing e.g. show_result(X.cpu())")
|
|
65
68
|
sn = SquareNet(gridshape = X.shape[:-1])
|
|
66
69
|
sn.pointsmaped = X
|
|
67
70
|
sn.plot(style = "mesh", animate = animate, save = animate)
|
|
@@ -83,7 +86,10 @@ def print_zoom(Ygrid, center, side=1):
|
|
|
83
86
|
Number of cells shown on each side of the center.
|
|
84
87
|
"""
|
|
85
88
|
import numpy as np
|
|
86
|
-
|
|
89
|
+
try:
|
|
90
|
+
Ygrid = np.asarray(Ygrid)
|
|
91
|
+
except:
|
|
92
|
+
print("Array still on GPU, move it back to gpu first befor showing e.g. print_zoom(X.cpu())")
|
|
87
93
|
ndim = Ygrid.ndim - 1
|
|
88
94
|
if ndim not in (2, 3):
|
|
89
95
|
raise ValueError("printzoom only for 2D/3D grids")
|
|
@@ -43,9 +43,12 @@ def astype(X, dtype_str, reference_array=None):
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
def inplace_sort(X, axis):
|
|
46
|
-
|
|
46
|
+
xp, backend_name = get_backend(X)
|
|
47
47
|
if backend_name == 'torch':
|
|
48
48
|
X.copy_(X.sort(dim=axis)[0])
|
|
49
|
+
if backend_name == "cupy":
|
|
50
|
+
X[...] = xp.ascontiguousarray(X)
|
|
51
|
+
X.sort(axis=axis)
|
|
49
52
|
else:
|
|
50
53
|
X.sort(axis=axis)
|
|
51
54
|
|
|
@@ -183,6 +183,7 @@ def _sort_along_direction(X, direction):
|
|
|
183
183
|
|
|
184
184
|
elif level == 2:
|
|
185
185
|
ax0, ax1 = xp.where(direction != 0)[0]
|
|
186
|
+
ax0, ax1 = int(ax0), int(ax1)
|
|
186
187
|
Y = xp.moveaxis(X, [ax0, ax1], [-2, -1])
|
|
187
188
|
flipaxes = []
|
|
188
189
|
for ax, _ax in zip([ax0, ax1], [-2, -1]):
|
|
@@ -195,6 +196,7 @@ def _sort_along_direction(X, direction):
|
|
|
195
196
|
|
|
196
197
|
elif level == 3:
|
|
197
198
|
ax0, ax1, ax2 = xp.where(direction != 0)[0]
|
|
199
|
+
ax0, ax1, ax2 = int(ax0), int(ax1), int(ax2)
|
|
198
200
|
Y = xp.moveaxis(X, [ax0, ax1, ax2], [-3, -2, -1])
|
|
199
201
|
flipaxes = []
|
|
200
202
|
for ax, _ax in zip([ax0, ax1, ax2], [-3, -2, -1]):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gridpoints
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
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
|
|
@@ -36,7 +36,7 @@ NaNs and Infs are supported in a consistent manner:
|
|
|
36
36
|
This allow to deal with prime or variable N, as long as one is ready to
|
|
37
37
|
deal with void/special grid cells.
|
|
38
38
|
|
|
39
|
-
Expected runtime for sorting 1 million points: CPU → < 10s, GPU → <
|
|
39
|
+
Expected runtime for sorting 1 million points: CPU → < 10s, GPU → < 500 ms
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|