Skip to content

Commit

Permalink
Merge pull request #13076 from shireenchand/pr7
Browse files Browse the repository at this point in the history
nextafter
  • Loading branch information
zhumakhan authored Apr 15, 2023
2 parents 8b598bc + cae0350 commit 34a93b6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# global
import ivy

# local
from ivy.functional.frontends.numpy.func_wrapper import (
to_ivy_arrays_and_back
)


@to_ivy_arrays_and_back
def nextafter(x1, x2, /, *, out=None):
return ivy.nextafter(x1, x2, out=out)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# local
import ivy_tests.test_ivy.helpers as helpers
from ivy_tests.test_ivy.helpers import handle_frontend_test


@handle_frontend_test(
fn_tree="numpy.nextafter",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("float"),
num_arrays=2
),
)
def test_numpy_nextafter(
dtype_and_x,
frontend,
test_flags,
fn_tree,
on_device,
):
input_dtype, x = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
frontend=frontend,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
test_values=False,
x1=x[0],
x2=x[1]
)

0 comments on commit 34a93b6

Please sign in to comment.