Skip to content

Commit

Permalink
Match Array API tests (run array-api tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityagoel4512 committed Jul 10, 2024
1 parent 550f803 commit 5c5ce1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ndonnx/_core/_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@ def cosh(self, x):
return _unary_op(x, opx.cosh, dtypes.float32)

def divide(self, x, y):
return _variadic_op(
[x, y], opx.div, via_dtype=dtypes.float64, cast_return=False
x, y = promote(x, y)
via_dtype = (
dtypes.float64
if x.dtype in (dtypes.nint64, dtypes.int64)
else dtypes.float32
)
return _variadic_op([x, y], opx.div, via_dtype=via_dtype, cast_return=False)

def equal(self, x, y) -> Array:
x, y = promote(x, y)
Expand Down

0 comments on commit 5c5ce1d

Please sign in to comment.