Skip to content

Commit

Permalink
fix: cross_section array order was incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Mar 13, 2024
1 parent f175d41 commit 6827c92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fastxs3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ auto section(

const uint64_t voxels = sx * sy * sz;

py::array_t arr = py::array_t<float, py::array::f_style>(voxels);
py::array_t arr = py::array_t<float, py::array::f_style>({ sx, sy, sz });
float* data = static_cast<float*>(arr.request().ptr);
std::fill(data, data + voxels, 0.0f);

Expand All @@ -39,7 +39,7 @@ auto section(
data
);

return arr.reshape({ sx, sy, sz });
return arr;
}

auto area(
Expand Down

0 comments on commit 6827c92

Please sign in to comment.