Skip to content

Commit

Permalink
Fix a JAX import issue related to #524 which introduced a separate is…
Browse files Browse the repository at this point in the history
…sue from how jax does its import/setup.
  • Loading branch information
Lnaden committed Mar 21, 2024
1 parent 0d936b4 commit b23f16e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pymbar/mbar_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
# Capture user-disabled JAX instead "JAX not found"
raise ImportError("Jax disabled by force_no_jax in mbar_solvers.py")
try:
from jax.config import config
# This works with pre- and post- JAX 0.3.25
# If you use try...except around a from jax.config import config then
# config gets mangled and the x64_enabled flag doesn't exist.
from jax import config

if not config.x64_enabled:
# Warn that we're going to be setting 64 bit jax
Expand Down

0 comments on commit b23f16e

Please sign in to comment.