From b33ef5ebd1d862e569f017a30663582f12c6c63a Mon Sep 17 00:00:00 2001 From: Ethan Meitz <54505069+ejmeitz@users.noreply.github.com> Date: Thu, 28 Aug 2025 21:48:10 -0400 Subject: [PATCH] manually wrap isapprox --- src/ndarray.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ndarray.cpp b/src/ndarray.cpp index 277f5aa..a218aa4 100644 --- a/src/ndarray.cpp +++ b/src/ndarray.cpp @@ -295,4 +295,14 @@ CN_NDArray* nda_get_slice(CN_NDArray* arr, const CN_Slice* slices, return new CN_NDArray{NDArray(std::move(result))}; } +CN_NDArray* nda_isapprox(CN_NDArray* rhs1, CN_NDArray* rhs2, float atol, float rtol){ + CN_Type type(legate::bool_()); + const auto shape = rhs.shape(); + std::vector out_shape(shape); + NDArray result = zeros(std::move(out_shape), type.obj); + # HOW TO PASS KWARGS??? + result.binary_op(CuPyNumericBinaryOpCode::CUPYNUMERIC_BINOP_ISCLOSE, rhs1->obj, rhs2->obj); + return new CN_NDArray{std::move(result))}; +} + } // extern "C"