xtensor icon indicating copy to clipboard operation
xtensor copied to clipboard

xt::isclose should work also with scalars

Open tdegeus opened this issue 2 years ago • 0 comments

Current xt::allclose works with scalar inputs, but xt::isclose does not. It gives the following error:

xtensor/xfunction.hpp:315:9: note: candidate template ignored: requirement 'xfunction<logical_not, xfunction<isclose, const xtensor_container<uvector<double, allocator<double>>, 2, xt::layout_type::row_major, xtensor_expression_tag> &, xscalar<const double &>>>::all_xscalar<xt::xfunction<xt::detail::isclose, const xt::xtensor_container<xt::uvector<double, std::allocator<double>>, 2, xt::layout_type::row_major, xt::xtensor_expression_tag> &, xt::xscalar<const double &>>>::value' was not satisfied [with UT = xt::xfunction<xt::detail::logical_not, xt::xfunction<xt::detail::isclose, const xt::xtensor_container<xt::uvector<double>, 2, xt::layout_type::row_major> &, xt::xscalar<const double &>>>]
        operator value_type() const;

tdegeus avatar Oct 19 '21 11:10 tdegeus