fix(math): fix transpose operation
This commit is contained in:
@@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user