Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions bioptim/gui/check_conditioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from casadi import Function, jacobian, hessian, sum1
from matplotlib import pyplot as plt
import matplotlib.colors as mcolors
import matplotlib.cm as mcm
from ..interfaces.ipopt_interface import IpoptInterface


Expand Down Expand Up @@ -116,7 +115,7 @@ def evaluate_hessian_objective(v, ocp):

def create_conditioning_plots(ocp):

cmap = mcm.get_cmap("seismic")
cmap = plt.get_cmap("seismic")
cmap.set_bad(color="k")
interface = IpoptInterface(ocp)
variables_vector = ocp.variables_vector
Expand Down Expand Up @@ -231,7 +230,7 @@ def update_objective_plot(v, ocp):
hessian_matrix, condition_number, convexity = evaluate_hessian_objective(v, ocp)
axis_obj = ocp.conditioning_plots["axis_obj"]
im_objectives_hessian = ocp.conditioning_plots["im_objectives_hessian"]
cmap = mcm.get_cmap("seismic")
cmap = plt.get_cmap("seismic")

# Hessian objective plot
hess_min = np.min(hessian_matrix) if hessian_matrix.shape[0] != 0 else 0
Expand Down
3 changes: 1 addition & 2 deletions bioptim/gui/ipopt_output_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import numpy as np
from casadi import jacobian, gradient, sum1, Function
from matplotlib import pyplot as plt
from matplotlib.cm import get_cmap

from ..misc.parameters_types import Str, Int

Expand All @@ -18,7 +17,7 @@ def create_ipopt_output_plot(ocp, interface):
axs[2].set_ylabel("inf_du", fontweight="bold")

plots = []
colors = get_cmap("viridis")
colors = plt.get_cmap("viridis")
for i in range(3):
plot = axs[i].plot([0], [1], linestyle="-", marker=".", color="k")
plots.append(plot[0])
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
dependencies:
- python >=3.10
- biorbd >=1.12,<1.13
- matplotlib
- matplotlib >= 3.8.0
- pyqt
- pyqtgraph
- python-graphviz
Expand Down
Loading