Skip to content

Commit 6486b10

Browse files
authored
Merge pull request #2365 from JohanMabille/chunk_assign
Fixed chunked_iterator
2 parents a1f6b16 + df0b005 commit 6486b10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/xtensor/xchunked_assign.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ namespace xt
114114

115115
inline decltype(auto) get_chunk(A& arr, typename A::size_type i, const xstrided_slice_vector&) const
116116
{
117-
return *(arr.chunks().begin() + i);
117+
using difference_type = typename A::difference_type;
118+
return *(arr.chunks().begin() + static_cast<difference_type>(i));
118119
}
119120
};
120121

0 commit comments

Comments
 (0)