Skip to content

Commit 6d4379a

Browse files
authored
respond to Stefan's comment
1 parent 97b1db8 commit 6d4379a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pygsti/data/dataset.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,6 +1731,9 @@ def _add_raw_arrays(self, circuit, oli_array, time_array, rep_array,
17311731
self._add_explicit_repetition_counts()
17321732

17331733
if rep_array is not None:
1734+
# Check for entries that are numerically equal to zero. For any such entries,
1735+
# so them to _exactly_ zero in preparation for floating-point equality checks
1736+
# with zero below, and in unit tests.
17341737
dtype_info = _np.finfo(rep_array.dtype)
17351738
near_zero = rep_array < 10**(-1.5*dtype_info.precision)
17361739
rep_array[near_zero] = 0

0 commit comments

Comments
 (0)