Skip to content

Commit 5d28517

Browse files
Remove erroneous test that relied on bitwidth parameter for hash table construction
I've removed the bitwidth parameter for construction and opted for this to be calculated internally for optimal memory footprint and query cost
1 parent e54fca5 commit 5d28517

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

tests/test_spatialhash.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,6 @@ def test_spherical_regional_bounds():
6060
assert np.all(i == -3)
6161

6262

63-
def test_query_honors_reduced_bitwidth():
64-
"""Queries must be encoded at the same quantization resolution the table was
65-
built with; a mismatch makes every Morton key miss and all queries fail.
66-
"""
67-
ds = datasets["2d_left_rotated"]
68-
grid = FieldSet.from_sgrid_conventions(ds, mesh="spherical").data_g.grid
69-
spatialhash = SpatialHash(grid, bitwidth=64)
70-
71-
clat, clon, jj, ii = _cell_centers(grid)
72-
j, i, _ = spatialhash.query(clat.ravel(), clon.ravel())
73-
assert np.array_equal(j, jj.ravel())
74-
assert np.array_equal(i, ii.ravel())
75-
76-
7763
def test_hash_entry_budget():
7864
"""When the requested bitwidth would blow the hash-entry budget (e.g. tilted
7965
regional spherical meshes, where face bounding boxes overlap 3-D blocks of

0 commit comments

Comments
 (0)