From 8e650e57c199fa428a48520b6f63063bea670b6e Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Fri, 25 Aug 2023 10:18:24 -0400 Subject: [PATCH] Remove assert --- stanio/__init__.py | 2 +- stanio/csv.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stanio/__init__.py b/stanio/__init__.py index bcda030..cc2bef2 100644 --- a/stanio/__init__.py +++ b/stanio/__init__.py @@ -11,4 +11,4 @@ "stan_variables", ] -__version__ = "0.3.0" +__version__ = "0.3.1" diff --git a/stanio/csv.py b/stanio/csv.py index 5f6fd78..5b1ab43 100644 --- a/stanio/csv.py +++ b/stanio/csv.py @@ -20,8 +20,8 @@ def read_csv(filenames: Union[str, List[str]]) -> Tuple[str, npt.NDArray[np.floa pass if header == "": header = file_header - else: - assert header == file_header, "Headers do not match" + elif header != file_header: + raise ValueError("Headers do not match") data[i] = np.loadtxt(fd, delimiter=",", comments="#") return header.strip(), np.stack(data, axis=0)