Skip to content

Commit

Permalink
making import of TerminalCondition more version agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
jgostick committed Aug 7, 2024
1 parent e8047b1 commit 933a02e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions openpnm/algorithms/_reactive_transport.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import logging
import sys

import numpy as np
from numpy.linalg import norm
from scipy.optimize._nonlin import TerminationCondition # Fix: import from _nonlin.py for compatibility with scipy >=1.14, should be addressed more sustainable
try: # For scipy < 1.14
from scipy.optimize.nonlin import TerminationCondition
except ImportError: # For newer Scipy
from scipy.optimize._nonlin import TerminationCondition

Check warning on line 8 in openpnm/algorithms/_reactive_transport.py

View check run for this annotation

Codecov / codecov/patch

openpnm/algorithms/_reactive_transport.py#L7-L8

Added lines #L7 - L8 were not covered by tests
from tqdm.auto import tqdm

from openpnm.algorithms import Transport
from openpnm.utils import Docorator, TypedList


__all__ = ["ReactiveTransport"]


Expand Down

0 comments on commit 933a02e

Please sign in to comment.