Skip to content

Commit

Permalink
conj ivy-llc#12400 : Added conj function to numpy frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
RakshitKumar04 committed Mar 13, 2023
1 parent 6bf58a3 commit 9e4ad90
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
)


@to_ivy_arrays_and_back
def _conj(val):
return ivy.conj(val);


@to_ivy_arrays_and_back
def _imag(val):
return ivy.imag(val)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@
from ivy_tests.test_ivy.helpers import handle_frontend_test


# conj
@handle_frontend_test(
fn_tree = "numpy.conj",
dtype_and_x = helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("valid")),
test_with_out = st.just(False),
)
def test_numpy_conj(
dtype_and_x,
frontend,
test_flags,
fn_tree,
on_device,
):
input_dtypes, x = dtype_and_x
helpers.test_frontend_function(
input_dtypes = input_dtypes,
frontend = frontend,
test_flags = test_flags,
fn_tree = fn_tree,
on_device = on_device,
val = x[0],
)


# imag
@handle_frontend_test(
fn_tree="numpy.imag",
Expand Down

0 comments on commit 9e4ad90

Please sign in to comment.