fix(math): fix unary expression shape reporting
This commit is contained in:
@@ -51,7 +51,7 @@ struct unary_expression : expression_tag, ops_provider<unary_expression<E, Op>>
|
|||||||
unary_expression(EFwd&& expr, OpFwd&& op = Op{}) // NOLINT
|
unary_expression(EFwd&& expr, OpFwd&& op = Op{}) // NOLINT
|
||||||
: expr(std::forward<EFwd>(expr)), op(std::forward<OpFwd>(op)) {}
|
: expr(std::forward<EFwd>(expr)), op(std::forward<OpFwd>(op)) {}
|
||||||
|
|
||||||
constexpr auto shape() const { return expr.shape(); }
|
constexpr auto shape() const { return Op::shape(expr); }
|
||||||
|
|
||||||
auto coeff(std::size_t index) const { return op(index, std::as_const(expr)); }
|
auto coeff(std::size_t index) const { return op(index, std::as_const(expr)); }
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user