Skip to content

Commit 5c6043c

Browse files
authored
Fill xcontainers of dynamic layout contiguously if their runtime layout is contiguous
1 parent 8c0a484 commit 5c6043c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/xtensor/xcontainer.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ namespace xt
422422
template <class T>
423423
inline void xcontainer<D>::fill(const T& value)
424424
{
425-
if (contiguous_layout)
425+
if (contiguous_layout || this->is_contiguous())
426426
{
427427
std::fill(this->linear_begin(), this->linear_end(), value);
428428
}

0 commit comments

Comments
 (0)