Skip to content

Commit 680f33e

Browse files
committed
Handle NaN
1 parent d950eea commit 680f33e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

xplt/timestructure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,9 +1308,9 @@ def update(
13081308
for metric in F.keys():
13091309
# calculate metrics
13101310
v, lim = self._calculate_metric(N, metric, axis=1)
1311-
F[metric][i] = np.mean(v)
1312-
F_std[metric][i] = np.std(v) or np.nan
1313-
F_poisson[metric][i] = np.mean(lim)
1311+
F[metric][i] = np.nanmean(v)
1312+
F_std[metric][i] = np.nanstd(v) or np.nan
1313+
F_poisson[metric][i] = np.nanmean(lim)
13141314

13151315
DT = DT * self.factor_for(self.on_x)
13161316

0 commit comments

Comments
 (0)