Skip to content

Commit 590440e

Browse files
committed
Avoid converting MaskedConstant to nan
1 parent d2f5211 commit 590440e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

openmc_plotter/plotgui.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from matplotlib.backends.backend_qt5agg import FigureCanvas
1313
import matplotlib.pyplot as plt
1414
import numpy as np
15+
import numpy.ma as ma
1516

1617
from .plot_colors import rgb_normalize, invert_rgb
1718
from .plotmodel import DomainDelegate, PlotModel
@@ -287,7 +288,7 @@ def mouseMoveEvent(self, event):
287288

288289
if self.model.tally_data is not None:
289290
tid, value = self.getTallyInfo(event)
290-
if value is not None and not np.isnan(value):
291+
if value is not None and value is not ma.masked:
291292
self.updateTallyDataIndicatorValue(value)
292293
tallyInfo = "Tally {} {}: {:.5E}".format(
293294
tid, cv.tallyValue, float(value))

0 commit comments

Comments
 (0)