Skip to content

Commit

Permalink
Fix random walk move construction double negative
Browse files Browse the repository at this point in the history
  • Loading branch information
rytheranderson committed Dec 3, 2023
1 parent 1e9d640 commit 5b2d590
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pyfracgen/randomwalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
def construct_moves(basis: Moves3D) -> Moves3D:
basis = np.r_[basis, -1 * basis, [array([0, 0, 0])]]
nonnull = list(
itt.filterfalse(
lambda x: not np.any(x), (b0 + b1 for b0, b1 in itt.combinations(basis, 2))
)
filter(lambda x: np.any(x), (b0 + b1 for b0, b1 in itt.combinations(basis, 2)))
)
moves: Moves3D = np.unique(nonnull, axis=0)
return moves
Expand Down

0 comments on commit 5b2d590

Please sign in to comment.