Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
`ValueError: Unable to avoid copy while creating a new array`
  • Loading branch information
davidcaron committed Jul 22, 2024
1 parent 310a2b6 commit eec3a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def test_nan():
points = np.random.random((3, 1000)).T

# compute kdtree where points are not located
kdtree = jakteristics.cKDTree(points + 2)
kdtree = jakteristics.cKDTree((points + 2).copy())

features = jakteristics.compute_features(
points, 0.15, kdtree=kdtree, feature_names=FEATURE_NAMES
Expand All @@ -147,7 +147,7 @@ def test_nan():
def test_with_kdtree_not_same_point_count():
points = np.random.random((3, 1000)).T

kdtree = jakteristics.cKDTree(points)
kdtree = jakteristics.cKDTree((points).copy())
features = jakteristics.compute_features(
points[::100], 0.30, kdtree=kdtree, feature_names=FEATURE_NAMES
)
Expand Down

0 comments on commit eec3a6a

Please sign in to comment.