From 58dec12db6753acce111dbb1576c24fe4b134751 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Wed, 25 Sep 2024 12:23:44 -0400 Subject: [PATCH] [bug] angleinvcdf and invcdf are not read in full in pmcx, fix #233 --- src/pmcx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pmcx.cpp b/src/pmcx.cpp index 8249dbeb..84b3ae4b 100644 --- a/src/pmcx.cpp +++ b/src/pmcx.cpp @@ -847,7 +847,7 @@ void parse_config(const py::dict& user_cfg, Config& mcx_config) { } auto buffer_info = f_style_volume.request(); - unsigned int nphase = buffer_info.shape.size(); + unsigned int nphase = buffer_info.size; float* val = static_cast(buffer_info.ptr); mcx_config.nphase = nphase + 2; mcx_config.invcdf = (float*) calloc(mcx_config.nphase, sizeof(float)); @@ -872,7 +872,7 @@ void parse_config(const py::dict& user_cfg, Config& mcx_config) { } auto buffer_info = f_style_volume.request(); - unsigned int nangle = buffer_info.shape.size(); + unsigned int nangle = buffer_info.size; float* val = static_cast(buffer_info.ptr); mcx_config.nangle = nangle; mcx_config.angleinvcdf = (float*) calloc(mcx_config.nangle, sizeof(float));