Skip to content

Commit

Permalink
Fix randomly failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
CSSFrancis committed Mar 24, 2024
1 parent 9c58946 commit 620b01c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyxem/tests/utils/test_vector_utils.py
Expand Up @@ -137,9 +137,9 @@ def test_get_angle_cartesian_vec_input_validation():


def test_filter_near_basis():
basis_vectors = np.random.randint(0, 100, (10, 2))

shifts = np.random.rand(10, 2)
rng = np.random.default_rng(10)
basis_vectors = rng.integers(0, 100, (10, 2))
shifts = rng.random((10, 2))
dist = np.linalg.norm(shifts, axis=1)
shifted = basis_vectors + shifts
filt = filter_vectors_near_basis(shifted, basis_vectors, distance=0.4)
Expand Down

0 comments on commit 620b01c

Please sign in to comment.