Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented Igamma #21393

Merged
merged 3 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ivy/functional/frontends/tensorflow/raw_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,3 +957,17 @@ def Svd(*, input, full_matrices=False, compute_uv=True, name=None):
"tensorflow",
)(map_raw_ops_alias(tf_frontend.general_functions.einsum))
)


Igamma = to_ivy_arrays_and_back(
with_supported_dtypes(
{
"2.13.0 and below": (
"float64",
"float32",
"half",
),
},
"tensorflow",
)(map_raw_ops_alias(tf_frontend.math.igamma))
)
40 changes: 40 additions & 0 deletions ivy_tests/test_ivy/test_frontends/test_tensorflow/test_raw_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -4345,3 +4345,43 @@ def test_tensorflow_Svd(
atol=1e-2,
ground_truth_backend=frontend,
)


@handle_frontend_test(
fn_tree="tensorflow.raw_ops.Igamma",
dtype_and_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("valid"),
num_arrays=2,
shared_dtype=True,
abs_smallest_val=1e-5,
min_num_dims=2,
max_num_dims=2,
min_dim_size=3,
max_dim_size=3,
min_value=2,
max_value=100,
allow_nan=False,
),
test_with_out=st.just(False),
)
def test_tensorflow_Igamma(
*,
dtype_and_x,
on_device,
fn_tree,
backend_fw,
frontend,
test_flags,
):
input_dtype, xs = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
frontend=frontend,
backend_to_test=backend_fw,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
rtol=1e-04,
a=xs[0],
x=xs[1],
)
Loading