Skip to content

Commit 283f2b8

Browse files
authored
Fix conversion warning in xrepeat (#2732)
1 parent 44b56bb commit 283f2b8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

include/xtensor/xrepeat.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ namespace xt
263263
, m_shape(e.shape())
264264
{
265265
using shape_value_type = typename shape_type::value_type;
266-
m_shape[axis] = static_cast<shape_value_type>(std::accumulate(m_repeats.begin(), m_repeats.end(), 0));
266+
m_shape[axis] = static_cast<shape_value_type>(
267+
std::accumulate(m_repeats.begin(), m_repeats.end(), shape_value_type(0))
268+
);
267269
}
268270

269271
/**

0 commit comments

Comments
 (0)