From 283f2b8375215fc05da9f91a1e7f16e5f75cf238 Mon Sep 17 00:00:00 2001 From: bredej Date: Sun, 15 Oct 2023 14:48:41 +0200 Subject: [PATCH] Fix conversion warning in xrepeat (#2732) --- include/xtensor/xrepeat.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/xtensor/xrepeat.hpp b/include/xtensor/xrepeat.hpp index 09c792bdd..d16125530 100644 --- a/include/xtensor/xrepeat.hpp +++ b/include/xtensor/xrepeat.hpp @@ -263,7 +263,9 @@ namespace xt , m_shape(e.shape()) { using shape_value_type = typename shape_type::value_type; - m_shape[axis] = static_cast(std::accumulate(m_repeats.begin(), m_repeats.end(), 0)); + m_shape[axis] = static_cast( + std::accumulate(m_repeats.begin(), m_repeats.end(), shape_value_type(0)) + ); } /**