Skip to content

Commit

Permalink
fix: implementation of inside
Browse files Browse the repository at this point in the history
  • Loading branch information
BillHuang2001 committed Oct 11, 2023
1 parent 6f16b36 commit fb250c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/evox/problems/numerical/maf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@jit
def inside(x, a, b):
"""check if x is in [a, b] or [b, a]"""
return (a <= x <= b) | (b <= x <= a)
return jnp.minimum(a, b) <= x & x <= jnp.maximum(a, b)


@jit
Expand Down

0 comments on commit fb250c5

Please sign in to comment.