Skip to content

Commit 3d00c6a

Browse files
authored
Merge pull request #636 from bobmyhill/catch_warning
catch cvxpy raise_error future warning
2 parents e34ce02 + d019d3d commit 3d00c6a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

burnman/tools/polytope.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@
99
from sympy import Matrix
1010
from scipy.linalg import block_diag
1111

12+
import warnings
1213
import logging
1314
import importlib
1415
from ..classes.polytope import MaterialPolytope, independent_row_indices
1516
from ..classes.solution import Solution
1617
from ..classes.composite import Composite
1718
from .solution import transform_solution_to_new_basis
1819

20+
logging.captureWarnings(True)
21+
warnings.filterwarnings(
22+
"ignore",
23+
message="The default value of raise_error will change to True in the future.",
24+
category=FutureWarning,
25+
)
26+
1927
try:
2028
cp = importlib.import_module("cvxpy")
2129
except ImportError as err:

0 commit comments

Comments
 (0)