fix(math): fix transpose operation

This commit is contained in:
2026-11-01 13:20:19 +01:00
parent c96d31a378
commit c65743e957
+2 -1
View File
@@ -195,8 +195,9 @@ struct transpose {
template <typename E>
constexpr auto operator()(std::size_t index, const E& expr) const {
const std::size_t rows = expr.shape().template get<0>();
const std::size_t cols = expr.shape().template get<1>();
return expr.coeff(((index % cols) * cols) + (index / cols));
return expr.coeff(((index % rows) * cols) + (index / rows));
}
};