From 70f95ba7d2cb4d6173ea1daa39ad056aa0218fd6 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Thu, 22 Aug 2024 01:08:07 -0400 Subject: [PATCH] [pmcx] fix CI error for pmcx --- pmcx/README.md | 2 +- pmcx/pmcx/__init__.py | 2 +- pmcx/setup.py | 2 +- src/pmcx.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pmcx/README.md b/pmcx/README.md index 4713e167..1ad5b40d 100644 --- a/pmcx/README.md +++ b/pmcx/README.md @@ -4,7 +4,7 @@ - Copyright: (C) Matin Raayai Ardakani (2022-2023) , Qianqian Fang (2019-2024) , Fan-Yu Yen (2023-2024) - License: GNU Public License V3 or later -- Version: 0.3.3 +- Version: 0.3.4 - URL: https://pypi.org/project/pmcx/ - Github: https://github.com/fangq/mcx diff --git a/pmcx/pmcx/__init__.py b/pmcx/pmcx/__init__.py index eb29e4cd..7bf35da2 100644 --- a/pmcx/pmcx/__init__.py +++ b/pmcx/pmcx/__init__.py @@ -49,7 +49,7 @@ # from .files import loadmc2, loadmch, load, save from .bench import bench -__version__ = "0.3.3" +__version__ = "0.3.4" __all__ = ( "gpuinfo", diff --git a/pmcx/setup.py b/pmcx/setup.py index 860c4430..40c33098 100644 --- a/pmcx/setup.py +++ b/pmcx/setup.py @@ -123,7 +123,7 @@ def build_extension(self, ext): setup( name="pmcx", packages=["pmcx"], - version="0.3.3", + version="0.3.4", requires=["numpy"], license="GPLv3+", author="Matin Raayai Ardakani, Qianqian Fang, Fan-Yu Yen", diff --git a/src/pmcx.cpp b/src/pmcx.cpp index 87373a2c..8249dbeb 100644 --- a/src/pmcx.cpp +++ b/src/pmcx.cpp @@ -698,7 +698,7 @@ void parse_config(const py::dict& user_cfg, Config& mcx_config) { throw py::value_error("the 'polprop' field must a 2D array"); } - if ((buffer_info.shape.size() > 1 && buffer_info.shape.at(0) > 0 && buffer_info.shape.at(1) != 5) || buffer_info.shape.size() == 1 && buffer_info.shape.at(0) != 5) { + if ((buffer_info.shape.size() > 1 && buffer_info.shape.at(0) > 0 && buffer_info.shape.at(1) != 5) || (buffer_info.shape.size() == 1 && buffer_info.shape.at(0) != 5)) { throw py::value_error("the 'polprop' field must have 5 columns (mua, radius, rho, n_sph,n_bkg)"); } @@ -1007,7 +1007,7 @@ void parse_config(const py::dict& user_cfg, Config& mcx_config) { auto logfile_id_value = user_cfg["flog"]; if (py::int_::check_(logfile_id_value)) { - auto logid = py::int_(logfile_id_value); + int logid = py::int_(logfile_id_value); mcx_config.flog = (logid >= 2 ? stderr : (logid == 1 ? stdout : (mcx_config.printnum = -1, stdout))); } else if (py::str::check_(logfile_id_value)) { std::string logfile_id_string_value = py::str(logfile_id_value);