Skip to content

Commit

Permalink
ignore runtime errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dodu94 committed Feb 24, 2025
1 parent fa9a487 commit f751914
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/jade/post/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ def _get_figure(self) -> tuple[Figure, list[Axes]]:

# Comparison
if idx > 0 and plot_CE:
ratio = df[self.cfg.y].values / self.data[0][1][self.cfg.y].values
with np.errstate(divide="ignore", invalid="ignore"):
ratio = df[self.cfg.y].values / self.data[0][1][self.cfg.y].values
# Uniform plots actions
CE_ax.step(
df[self.cfg.x].values,
Expand Down Expand Up @@ -946,10 +947,11 @@ def _get_limits(

def _get_error_x_pos(x_array: np.ndarray) -> np.ndarray:
oldX = x_array
base = np.log(oldX[:-1])
shifted = np.log(oldX[1:])
newX = np.exp((base + shifted) / 2)
newX[0] = (oldX[1] + oldX[0]) / 2
with np.errstate(divide="ignore", invalid="ignore"):
base = np.log(oldX[:-1])
shifted = np.log(oldX[1:])
newX = np.exp((base + shifted) / 2)
newX[0] = (oldX[1] + oldX[0]) / 2
return newX


Expand Down

0 comments on commit f751914

Please sign in to comment.