From 6827c920c1faa97069f0b0696d6d10afe019a566 Mon Sep 17 00:00:00 2001 From: William Silversmith Date: Wed, 13 Mar 2024 00:44:14 -0400 Subject: [PATCH] fix: cross_section array order was incorrect --- src/fastxs3d.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fastxs3d.cpp b/src/fastxs3d.cpp index 59165f5..abea858 100644 --- a/src/fastxs3d.cpp +++ b/src/fastxs3d.cpp @@ -26,7 +26,7 @@ auto section( const uint64_t voxels = sx * sy * sz; - py::array_t arr = py::array_t(voxels); + py::array_t arr = py::array_t({ sx, sy, sz }); float* data = static_cast(arr.request().ptr); std::fill(data, data + voxels, 0.0f); @@ -39,7 +39,7 @@ auto section( data ); - return arr.reshape({ sx, sy, sz }); + return arr; } auto area(