Skip to content

Commit b165a20

Browse files
CalebG6OriolAbril
andauthored
Added a NaN check in dotplot.py to avoid a deadloop in the matplot backend (#2483)
* check for NaNs in values before plotting and remove locally if there are any * check for NaNs in values before plotting and remove locally if there are any * check for NaNs in values before plotting and remove locally if there are any * silently ignore nans in plot_dot --------- Co-authored-by: Oriol (ProDesk) <oriol.abril.pla@gmail.com>
1 parent 0285324 commit b165a20

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arviz/plots/dotplot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import numpy as np
44

5+
56
from ..rcparams import rcParams
67
from .plot_utils import get_plotting_function
78

@@ -148,6 +149,7 @@ def plot_dot(
148149
raise ValueError("marker argument is valid only for matplotlib backend")
149150

150151
values = np.ravel(values)
152+
values = values[np.isfinite(values)]
151153
values.sort()
152154

153155
if hdi_prob is None:

0 commit comments

Comments
 (0)