Skip to content

Commit

Permalink
Cleaner solution to b4151d9
Browse files Browse the repository at this point in the history
  • Loading branch information
unalmis committed Sep 16, 2024
1 parent 52adba9 commit 8d9b605
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions desc/integrals/interp_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,8 @@ def _root_cubic(C, sentinel, eps, distinct):

def irreducible(Q, R, b, mask):
# Three irrational real roots.
theta = jnp.arccos(
jnp.clip(
R / jnp.sqrt(jnp.where(mask, Q**3, 1.0)),
-1.0 + 0.01 * eps,
+1.0 - 0.01 * eps,
)
)
theta = R / jnp.sqrt(jnp.where(mask, Q**3, 1.0))
theta = jnp.arccos(jnp.where(jnp.abs(theta) < 1.0, theta, 0.0))
return jnp.moveaxis(
-2
* jnp.sqrt(Q)
Expand Down
Binary file modified tests/baseline/test_bounce1d_checks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8d9b605

Please sign in to comment.