From 4045fb299b006c92ede4f2e9a92c2283e8500975 Mon Sep 17 00:00:00 2001 From: Drew Hubley <96780897+spectre-ns@users.noreply.github.com> Date: Thu, 4 Jan 2024 18:36:12 -0400 Subject: [PATCH] Update xbuilder.hpp --- include/xtensor/xbuilder.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xtensor/xbuilder.hpp b/include/xtensor/xbuilder.hpp index e124d764c..c6ee20ea1 100644 --- a/include/xtensor/xbuilder.hpp +++ b/include/xtensor/xbuilder.hpp @@ -565,12 +565,12 @@ namespace xt { size_t offset = 0; const size_t end = arr.dimension(); - bool after_axis = false; + size_t after_axis = 0; for (size_t i = 0; i < end; i++) { if (i == axis) { - after_axis = true; + after_axis = 1; } const auto& shape = arr.shape(); const size_t stride = std::accumulate(