gridpoints 1.0.1__tar.gz → 1.0.3__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.1 → gridpoints-1.0.3}/PKG-INFO +1 -1
- {gridpoints-1.0.1 → gridpoints-1.0.3}/pyproject.toml +1 -1
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/griddemo/__init__.py +1 -1
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/griddemo/quick_demo.py +8 -2
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints/__init__.py +1 -1
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints/array_libs.py +3 -1
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints.egg-info/PKG-INFO +1 -1
- {gridpoints-1.0.1 → gridpoints-1.0.3}/LICENSE +0 -0
- {gridpoints-1.0.1 → gridpoints-1.0.3}/README.md +0 -0
- {gridpoints-1.0.1 → gridpoints-1.0.3}/setup.cfg +0 -0
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints/diagonal_tricks.py +0 -0
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints/kdtree.py +0 -0
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints/mlg_sort.py +0 -0
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints.egg-info/SOURCES.txt +0 -0
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints.egg-info/dependency_links.txt +0 -0
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints.egg-info/requires.txt +0 -0
- {gridpoints-1.0.1 → gridpoints-1.0.3}/src/gridpoints.egg-info/top_level.txt +0 -0
|
@@ -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.3"
|
|
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,11 @@ 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.sort(xp.ascontiguousarray(X), axis=axis)
|
|
49
51
|
else:
|
|
50
52
|
X.sort(axis=axis)
|
|
51
53
|
|
|
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
|