diff --git a/include/array/array.h b/include/array/array.h index 9e06b24..a2239f7 100644 --- a/include/array/array.h +++ b/include/array/array.h @@ -965,7 +965,11 @@ NDARRAY_HOST_DEVICE auto convert_dim(const std::tuple& u) { template = sizeof...(Us)), int> = 0> NDARRAY_HOST_DEVICE auto convert_dim(const std::tuple& u) { // For dims beyond the rank of U, make a dimension of type T_I with extent 1. - return decltype(std::get(internal::declval()))(1); + auto d = decltype(std::get(internal::declval()))(1); + if (!internal::is_static(decltype(d)::Stride)) { + d.set_stride(0); + } + return d; } template