Skip to content

Commit b89a62c

Browse files
committed
flake fix
1 parent 58a2396 commit b89a62c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmdstanpy/stanfit/mcmc.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
Sequence,
1616
Tuple,
1717
Union,
18+
cast,
1819
)
1920

2021
import numpy as np
@@ -310,7 +311,8 @@ def _validate_csv_files(self) -> Dict[str, Any]:
310311
save_warmup=self._save_warmup,
311312
thin=self._thin,
312313
)
313-
self._chain_time.append(dzero.get("time"))
314+
time_info = cast(Dict[str, float], dzero.get("time") or {})
315+
self._chain_time.append(time_info)
314316
if not self._is_fixed_param:
315317
self._divergences[i] = dzero['ct_divergences']
316318
self._max_treedepths[i] = dzero['ct_max_treedepth']
@@ -323,7 +325,8 @@ def _validate_csv_files(self) -> Dict[str, Any]:
323325
save_warmup=self._save_warmup,
324326
thin=self._thin,
325327
)
326-
self._chain_time.append(drest.get("time"))
328+
time_info = cast(Dict[str, float], drest.get("time") or {})
329+
self._chain_time.append(time_info)
327330
for key in dzero:
328331
# check args that matter for parsing, plus name, version
329332
if (

0 commit comments

Comments
 (0)