Skip to content

Commit 5c792aa

Browse files
committed
Fix incorrect missing step size check
1 parent 4af87ab commit 5c792aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmdstanpy/utils/stancsv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,12 @@ def column_count(ln: bytes) -> int:
377377

378378
# Ensure step size exists and is valid float
379379
num, line = next(ln_iter)
380-
key, step_size = line.split(b" = ")
381-
if not key.startswith(b"# Step size"):
380+
if not line.startswith(b"# Step size"):
382381
raise ValueError(
383382
f"line {num}: expecting step size, "
384383
f"found:\n\t \"{line.decode()}\""
385384
)
385+
_, step_size = line.split(b" = ")
386386
try:
387387
float(step_size.strip())
388388
except ValueError as exc:

0 commit comments

Comments
 (0)