Skip to content

Commit f0048a4

Browse files
committed
proper nan check
1 parent 1032706 commit f0048a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygsti/tools/rbtheory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def predicted_rb_number(model, target_model, weights=None, d=None, rtype='EI'):
9090
"""
9191
if d is None: d = int(round(_np.sqrt(model.dim)))
9292
p = predicted_rb_decay_parameter(model, target_model, weights=weights)
93-
r = _rbtls.p_to_r(p, d=d, rtype=rtype) if p != _np.nan else _np.nan
93+
r = _rbtls.p_to_r(p, d=d, rtype=rtype) if _np.isnan(p) else _np.nan
9494
return r
9595

9696

0 commit comments

Comments
 (0)