Skip to content

Commit

Permalink
Fix conversion warning in xrepeat (#2732)
Browse files Browse the repository at this point in the history
  • Loading branch information
bredej authored Oct 15, 2023
1 parent 44b56bb commit 283f2b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/xtensor/xrepeat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ namespace xt
, m_shape(e.shape())
{
using shape_value_type = typename shape_type::value_type;
m_shape[axis] = static_cast<shape_value_type>(std::accumulate(m_repeats.begin(), m_repeats.end(), 0));
m_shape[axis] = static_cast<shape_value_type>(
std::accumulate(m_repeats.begin(), m_repeats.end(), shape_value_type(0))
);
}

/**
Expand Down

0 comments on commit 283f2b8

Please sign in to comment.