Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/xtensor-python/pyarray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ namespace xt
template <class S>
inline pyarray<T, L> pyarray<T, L>::from_shape(S&& shape)
{
auto shp = xtl::forward_sequence<shape_type>(shape);
auto shp = xtl::forward_sequence<shape_type, S>(shape);
return self_type(shp);
}
//@}
Expand Down Expand Up @@ -679,7 +679,7 @@ namespace xt
: base_type()
{
// TODO: prevent intermediary shape allocation
shape_type shape = xtl::forward_sequence<shape_type>(e.derived_cast().shape());
shape_type shape = xtl::forward_sequence<shape_type, decltype(e.derived_cast().shape())>(e.derived_cast().shape());
strides_type strides = xtl::make_sequence<strides_type>(shape.size(), size_type(0));
compute_strides(shape, layout_type::row_major, strides);
init_array(shape, strides);
Expand Down
2 changes: 1 addition & 1 deletion include/xtensor-python/pycontainer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ namespace xt
inline void pycontainer<D>::resize(const S& shape, const strides_type& strides)
{
detail::check_dims<shape_type>::run(shape.size());
derived_type tmp(xtl::forward_sequence<shape_type>(shape), strides);
derived_type tmp(xtl::forward_sequence<shape_type, decltype(shape)>(shape), strides);
*static_cast<derived_type*>(this) = std::move(tmp);
}

Expand Down
4 changes: 2 additions & 2 deletions include/xtensor-python/pytensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ namespace xt
inline pytensor<T, N, L> pytensor<T, N, L>::from_shape(S&& shape)
{
detail::check_dims<shape_type>::run(shape.size());
auto shp = xtl::forward_sequence<shape_type>(shape);
auto shp = xtl::forward_sequence<shape_type, S>(shape);
return self_type(shp);
}
//@}
Expand Down Expand Up @@ -378,7 +378,7 @@ namespace xt
inline pytensor<T, N, L>::pytensor(const xexpression<E>& e)
: base_type()
{
shape_type shape = xtl::forward_sequence<shape_type>(e.derived_cast().shape());
shape_type shape = xtl::forward_sequence<shape_type, decltype(e.derived_cast().shape())>(e.derived_cast().shape());
strides_type strides = xtl::make_sequence<strides_type>(N, size_type(0));
compute_strides(shape, layout_type::row_major, strides);
init_tensor(shape, strides);
Expand Down