internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ivy-llc/ivy

Issue:
tolist



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/manipulation.py b/ivy/functional/frontends/paddle/manipulation.py
--- a/ivy/functional/frontends/paddle/manipulation.py
+++ b/ivy/functional/frontends/paddle/manipulation.py
@@ -180,6 +180,11 @@ def tile(x, repeat_times, name=None):
     return ivy.tile(x, repeats=repeat_times)
 
 
+@to_ivy_arrays_and_back
+def tolist(x):
+    return ivy.to_list(x)
+
+
 @with_supported_dtypes(
     {"2.5.1 and below": ("bool", "int32", "int64", "float16", "float32", "float64")},
     "paddle",


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_manipulation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_manipulation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_manipulation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_manipulation.py
@@ -756,6 +756,32 @@ def test_paddle_tile(
     )
 
 
+@handle_frontend_test(
+    fn_tree="paddle.tolist",
+    dtype_and_x=helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("valid")),
+    test_with_out=st.just(False),
+)
+def test_paddle_tolist(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    backend_fw,
+    frontend,
+    test_flags,
+):
+    x_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=x_dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+    )
+
+
 # unbind
 @handle_frontend_test(
     fn_tree="paddle.unbind",
Repository: ivy-llc/ivy

Issue:
mask_indices



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py b/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
--- a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
+++ b/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
@@ -1,3 +1,5 @@
+import inspect
+
 import ivy
 from ivy.functional.frontends.numpy.func_wrapper import (
     to_ivy_arrays_and_back,
@@ -17,6 +19,21 @@ def indices(dimensions, dtype=int, sparse=False):
     return ivy.indices(dimensions, dtype=dtype, sparse=sparse)
 
 
+@to_ivy_arrays_and_back
+def mask_indices(n, mask_func, k=0):
+    mask_func_obj = inspect.unwrap(mask_func)
+    mask_func_name = mask_func_obj.__name__
+    try:
+        ivy_mask_func_obj = getattr(ivy.functional.frontends.numpy, mask_func_name)
+        a = ivy.ones((n, n))
+        mask = ivy_mask_func_obj(a, k=k)
+        indices = ivy.argwhere(mask.ivy_array)
+        ret = indices[:, 0], indices[:, 1]
+        return tuple(ret)
+    except AttributeError as e:
+        print(f"Attribute error: {e}")
+
+
 @to_ivy_arrays_and_back
 def tril_indices(n, k=0, m=None):
     return ivy.tril_indices(n, m, k)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_numpy/test_indexing_routines/test_generating_index_arrays.py b/ivy_tests/test_ivy/test_frontends/test_numpy/test_indexing_routines/test_generating_index_arrays.py
--- a/ivy_tests/test_ivy/test_frontends/test_numpy/test_indexing_routines/test_generating_index_arrays.py
+++ b/ivy_tests/test_ivy/test_frontends/test_numpy/test_indexing_routines/test_generating_index_arrays.py
@@ -1,6 +1,7 @@
 # global
 import numpy as np
 from hypothesis import strategies as st
+from numpy import triu, tril
 
 # local
 import ivy_tests.test_ivy.helpers as helpers
@@ -92,6 +93,39 @@ def test_numpy_indices(
     )
 
 
+@handle_frontend_test(
+    fn_tree="numpy.mask_indices",
+    n=helpers.ints(min_value=3, max_value=10),
+    mask_func=st.sampled_from([triu, tril]),
+    k=helpers.ints(min_value=-5, max_value=5),
+    input_dtype=helpers.get_dtypes("numeric"),
+    test_with_out=st.just(False),
+    number_positional_args=st.just(2),
+)
+def test_numpy_mask_indices(
+    n,
+    mask_func,
+    k,
+    input_dtype,
+    test_flags,
+    frontend,
+    backend_fw,
+    fn_tree,
+    on_device,
+):
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        test_flags=test_flags,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        n=n,
+        mask_func=mask_func,
+        k=k,
+    )
+
+
 @handle_frontend_test(
     fn_tree="numpy.tril_indices",
     n=helpers.ints(min_value=1, max_value=10),
Repository: ivy-llc/ivy

Issue:
unsorted_segment_min



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/tensorflow/math.py b/ivy/functional/frontends/tensorflow/math.py
--- a/ivy/functional/frontends/tensorflow/math.py
+++ b/ivy/functional/frontends/tensorflow/math.py
@@ -771,6 +771,22 @@ def unsorted_segment_mean(
     return x
 
 
+@to_ivy_arrays_and_back
+def unsorted_segment_min(data, segment_ids, num_segments, name="unsorted_segment_min"):
+    data = ivy.array(data)
+    segment_ids = ivy.array(segment_ids)
+
+    ivy.utils.assertions.check_equal(
+        list(segment_ids.shape), [list(data.shape)[0]], as_array=False
+    )
+    min_array = ivy.zeros(
+        tuple([num_segments.item()] + (list(data.shape))[1:]), dtype=ivy.int32
+    )
+    for i in range((segment_ids).shape[0]):
+        min_array[segment_ids[i]] = ivy.minimum(min_array[segment_ids[i]], data[i])
+    return min_array
+
+
 @to_ivy_arrays_and_back
 def unsorted_segment_sqrt_n(
     data, segment_ids, num_segments, name="unsorted_segement_sqrt_n"


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py
--- a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py
+++ b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_math.py
@@ -3103,6 +3103,38 @@ def test_tensorflow_unsorted_segment_mean(
     )
 
 
+# unsorted_segment_min
+@handle_frontend_test(
+    fn_tree="tensorflow.math.unsorted_segment_min",
+    data=helpers.array_values(dtype=ivy.int32, shape=(5, 6), min_value=1, max_value=9),
+    segment_ids=helpers.array_values(
+        dtype=ivy.int32, shape=(5,), min_value=0, max_value=4
+    ),
+    test_with_out=st.just(False),
+)
+def test_tensorflow_unsorted_segment_min(
+    *,
+    data,
+    segment_ids,
+    frontend,
+    test_flags,
+    fn_tree,
+    backend_fw,
+    on_device,
+):
+    helpers.test_frontend_function(
+        input_dtypes=["int32", "int64"],
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        data=data,
+        segment_ids=segment_ids,
+        num_segments=np.max(segment_ids) + 1,
+    )
+
+
 # unsorted_segment_sqrt_n
 @handle_frontend_test(
     fn_tree="tensorflow.math.unsorted_segment_sqrt_n",
Repository: ivy-llc/ivy

Issue:
interp



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/numpy/mathematical_functions.py b/ivy/functional/frontends/jax/numpy/mathematical_functions.py
--- a/ivy/functional/frontends/jax/numpy/mathematical_functions.py
+++ b/ivy/functional/frontends/jax/numpy/mathematical_functions.py
@@ -322,6 +322,11 @@ def inner(a, b):
     return ivy.inner(a, b)
 
 
+@to_ivy_arrays_and_back
+def interp(x, xp, fp, left=None, right=None, period=None):
+    return ivy.interp(x, xp, fp, left=left, right=right, period=period)
+
+
 @to_ivy_arrays_and_back
 def kron(a, b):
     a, b = promote_types_of_jax_inputs(a, b)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_mathematical_functions.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_mathematical_functions.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_mathematical_functions.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_mathematical_functions.py
@@ -1703,6 +1703,54 @@ def test_jax_inner(
     )
 
 
+@handle_frontend_test(
+    fn_tree="jax.numpy.interp",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        min_num_dims=1,
+        max_num_dims=1,
+    ),
+    dtype_and_xp_fp=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        num_arrays=2,
+        min_num_dims=1,
+        max_num_dims=1,
+    ),
+    left=st.one_of(st.floats(min_value=-1e04, max_value=1e04), st.just(np.nan)),
+    right=st.one_of(st.floats(min_value=-1e04, max_value=1e04), st.just(np.nan)),
+    test_with_out=st.just(False),
+)
+def test_jax_interp(
+    *,
+    dtype_and_x,
+    dtype_and_xp_fp,
+    left,
+    right,
+    on_device,
+    fn_tree,
+    frontend,
+    backend_fw,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    input_dtype2, xp_fp = dtype_and_xp_fp
+    xp = xp_fp[0]
+    fp = xp_fp[1]
+    helpers.test_frontend_function(
+        input_dtypes=[input_dtype, input_dtype2],
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        xp=xp,
+        fp=fp,
+        left=left,
+        right=right,
+    )
+
+
 # kron
 @handle_frontend_test(
     fn_tree="jax.numpy.kron",
Repository: ivy-llc/ivy

Issue:
clip_vector_norm



Discussion:

Resolving patch:
diff --git a/ivy/functional/ivy/general.py b/ivy/functional/ivy/general.py
--- a/ivy/functional/ivy/general.py
+++ b/ivy/functional/ivy/general.py
@@ -1060,6 +1060,18 @@ def clip_vector_norm(
         a: ivy.array([0., 0.894, 1.79]),
         b: ivy.array([0.849, 1.13, 1.41])
     }
+
+    With multiple :class:`ivy.Container` inputs:
+
+    >>> x = ivy.Container(a=ivy.array([0., 1., 2.]),
+    ...                   b=ivy.array([3., 4., 5.]))
+    >>> max_norm = ivy.Container(a=2, b=3)
+    >>> y = ivy.clip_vector_norm(x, max_norm)
+    >>> print(y)
+    {
+        a: ivy.array([0., 0.894, 1.79]),
+        b: ivy.array([2.449, 2.65, 2.83])
+    }
     """
     norm = ivy.vector_norm(x, keepdims=True, ord=p)
     ratio = ivy.stable_divide(max_norm, norm)


Test patch:
Repository: ivy-llc/ivy

Issue:
cov



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -1355,6 +1355,11 @@ def cumprod(self, dim, dtype):
     def count_nonzero(self, dim):
         return torch_frontend.count_nonzero(self, dim=dim)
 
+    def cov(self, /, *, correction=1, fweights=None, aweights=None):
+        return torch_frontend.cov(
+            self, correction=correction, fweights=fweights, aweights=aweights
+        )
+
     @with_unsupported_dtypes({"2.1.0 and below": ("bfloat16", "float16")}, "torch")
     def exp(self):
         return torch_frontend.exp(self)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
@@ -36,6 +36,7 @@
 )
 from ivy_tests.test_ivy.test_frontends.test_torch.test_miscellaneous_ops import (  # noqa
     dtype_value1_value2_axis,
+    _get_dtype_value1_value2_cov,
 )
 from ivy_tests.test_ivy.test_frontends.test_torch.test_linalg import (  # noqa
     _get_dtype_and_matrix,
@@ -5764,6 +5765,56 @@ def test_torch_tensor_count_nonzero(
     )
 
 
+# cov
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="torch.tensor",
+    method_name="cov",
+    dtype_and_x=_get_dtype_value1_value2_cov(
+        available_dtypes=helpers.get_dtypes("float"),
+        min_num_dims=2,
+        max_num_dims=2,
+        min_dim_size=2,
+        max_dim_size=5,
+        min_value=1,
+        max_value=1e10,
+        abs_smallest_val=0.01,
+        large_abs_safety_factor=2,
+        safety_factor_scale="log",
+    ),
+)
+def test_torch_tensor_cov(
+    dtype_and_x,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    on_device,
+    backend_fw,
+):
+    input_dtype, x, correction, fweights, aweights = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=["float64", "int64", "float64"],
+        backend_to_test=backend_fw,
+        init_all_as_kwargs_np={
+            "data": x,
+        },
+        method_input_dtypes=["int64", "float64"],
+        method_all_as_kwargs_np={
+            "correction": correction,
+            "fweights": fweights,
+            "aweights": aweights,
+        },
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend=frontend,
+        on_device=on_device,
+        rtol_=1e-2,
+        atol_=1e-2,
+    )
+
+
 # cross
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
FFT3D

FFT3D



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/tensorflow/raw_ops.py b/ivy/functional/frontends/tensorflow/raw_ops.py
--- a/ivy/functional/frontends/tensorflow/raw_ops.py
+++ b/ivy/functional/frontends/tensorflow/raw_ops.py
@@ -569,6 +569,14 @@ def FFT2D(*, input, name="FFT2D"):
     return ivy.astype(ivy.fft2(input, dim=(-2, -1)), input.dtype)
 
 
+@to_ivy_arrays_and_back
+def FFT3D(*, input, name="FFT3D"):
+    fft_result = ivy.fft(input, -1)
+    fft_result = ivy.fft(fft_result, -2)
+    fft_result = ivy.fft(fft_result, -3)
+    return ivy.astype(fft_result, input.dtype)
+
+
 @to_ivy_arrays_and_back
 def Fill(*, dims, value, name="Full"):
     return ivy.full(dims, value)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_raw_ops.py b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_raw_ops.py
--- a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_raw_ops.py
+++ b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_raw_ops.py
@@ -1885,6 +1885,45 @@ def test_tensorflow_FFT2D(
     )
 
 
+# FFT3D
+@handle_frontend_test(
+    fn_tree="tensorflow.raw_ops.FFT3D",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("complex"),
+        min_value=-1e5,
+        max_value=1e5,
+        min_num_dims=3,
+        max_num_dims=5,
+        min_dim_size=2,
+        max_dim_size=5,
+        large_abs_safety_factor=2.5,
+        small_abs_safety_factor=2.5,
+        safety_factor_scale="log",
+    ),
+)
+def test_tensorflow_FFT3D(
+    *,
+    dtype_and_x,
+    frontend,
+    test_flags,
+    fn_tree,
+    backend_fw,
+    on_device,
+):
+    dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        input=x[0],
+        rtol=1e-02,
+        atol=1e-02,
+    )
+
+
 # fill
 @handle_frontend_test(
     fn_tree="tensorflow.raw_ops.Fill",
Repository: ivy-llc/ivy

Issue:
heaviside

heaviside



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py
--- a/ivy/functional/frontends/paddle/tensor/tensor.py
+++ b/ivy/functional/frontends/paddle/tensor/tensor.py
@@ -927,6 +927,12 @@ def gather_(self, y, name=None):
         res = self.gather(self, y)
         return ivy.inplace_update(self, res)
 
+    @with_supported_dtypes(
+        {"2.5.1 and below": ("float32", "float64", "int32", "int64")}, "paddle"
+    )
+    def heaviside(self, y, name=None):
+        return paddle_frontend.heaviside(self, y)
+
     @with_supported_dtypes(
         {"2.5.1 and below": ("bool", "int32", "int64", "float32", "float64")}, "paddle"
     )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py
@@ -4609,6 +4609,48 @@ def test_paddle_tensor_expand(
     )
 
 
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="paddle.to_tensor",
+    method_name="heaviside",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        num_arrays=2,
+        allow_inf=False,
+        large_abs_safety_factor=2,
+        small_abs_safety_factor=2,
+        safety_factor_scale="log",
+        shared_dtype=True,
+    ),
+)
+def test_paddle_tensor_heaviside(
+    dtype_and_x,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    backend_fw,
+    on_device,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        init_all_as_kwargs_np={
+            "x": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={
+            "y": x[1],
+        },
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend_method_data=frontend_method_data,
+        frontend=frontend,
+        on_device=on_device,
+    )
+
+
 # tile
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
igamma



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/lax/operators.py b/ivy/functional/frontends/jax/lax/operators.py
--- a/ivy/functional/frontends/jax/lax/operators.py
+++ b/ivy/functional/frontends/jax/lax/operators.py
@@ -454,6 +454,11 @@ def gt(x, y):
     return ivy.greater(x, y)
 
 
+@to_ivy_arrays_and_back
+def igamma(a, x):
+    return ivy.igamma(a, x=x)
+
+
 @to_ivy_arrays_and_back
 def imag(x):
     return ivy.imag(x)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_lax/test_operators.py
@@ -1921,6 +1921,40 @@ def test_jax_gt(
     )
 
 
+# igamma
+@handle_frontend_test(
+    fn_tree="jax.lax.igamma",
+    dtypes_and_xs=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("numeric"),
+        num_arrays=2,
+        shared_dtype=True,
+    ),
+    test_with_out=st.just(False),
+)
+def test_jax_igamma(
+    *,
+    dtypes_and_xs,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    input_dtypes, (x, y) = dtypes_and_xs
+
+    helpers.test_frontend_function(
+        input_dtypes=input_dtypes,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        test_values=True,
+        x=x,
+        y=y,
+    )
+
+
 # imag
 @handle_frontend_test(
     fn_tree="jax.lax.imag",
Repository: ivy-llc/ivy

Issue:
is_complex



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py
--- a/ivy/functional/frontends/paddle/tensor/tensor.py
+++ b/ivy/functional/frontends/paddle/tensor/tensor.py
@@ -930,6 +930,9 @@ def frac(self, name=None):
     def gather(self, y, name=None):
         return paddle_frontend.gather(self, y)
 
+    def is_complex(self):
+        return paddle_frontend.is_complex(self)
+
     @with_unsupported_dtypes(
         {"2.5.2 and below": ("float16", "uint8", "int8", "bool")}, "paddle"
     )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_tensor.py
@@ -411,6 +411,39 @@ def test_paddle__reshape(
     )
 
 
+# is_complex
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="paddle.to_tensor",
+    method_name="is_complex",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+)
+def test_paddle_is_complex(
+    dtype_and_x,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    backend_fw,
+    on_device,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={"data": x[0]},
+        method_input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        method_all_as_kwargs_np={},
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend=frontend,
+        on_device=on_device,
+    )
+
+    
 # abs
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
ifft2

ifft2



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py b/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py
--- a/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py
+++ b/ivy/functional/frontends/numpy/fft/discrete_fourier_transform.py
@@ -74,6 +74,14 @@ def ifft(a, n=None, axis=-1, norm=None):
     return ivy.ifft(a, axis, norm=norm, n=n)
 
 
+@with_unsupported_dtypes({"1.24.3 and below": ("float16",)}, "numpy")
+@to_ivy_arrays_and_back
+def ifft2(a, s=None, axes=(-2, -1), norm=None):
+    a = ivy.asarray(a, dtype=ivy.complex128)
+    a = ivy.ifftn(a, s=s, axes=axes, norm=norm)
+    return a
+
+
 @with_unsupported_dtypes({"1.24.3 and below": ("float16",)}, "numpy")
 @to_ivy_arrays_and_back
 def ifftn(a, s=None, axes=None, norm=None):


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_numpy/test_fft/test_discrete_fourier_transform.py b/ivy_tests/test_ivy/test_frontends/test_numpy/test_fft/test_discrete_fourier_transform.py
--- a/ivy_tests/test_ivy/test_frontends/test_numpy/test_fft/test_discrete_fourier_transform.py
+++ b/ivy_tests/test_ivy/test_frontends/test_numpy/test_fft/test_discrete_fourier_transform.py
@@ -109,6 +109,27 @@ def test_numpy_ifft(dtype_and_x, backend_fw, frontend, test_flags, fn_tree, on_d
     )
 
 
+@handle_frontend_test(
+    fn_tree="numpy.fft.ifft2",
+    dtype_and_x=_x_and_ifft(),
+)
+def test_numpy_ifft2(dtype_and_x, backend_fw, frontend, test_flags, fn_tree, on_device):
+    input_dtype, x, dim, norm, n = 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,
+        test_values=True,
+        a=x,
+        s=None,
+        axes=None,
+        norm=norm,
+    )
+
+
 @handle_frontend_test(
     fn_tree="numpy.fft.ifftn",
     dtype_and_x=_x_and_ifft(),
Repository: ivy-llc/ivy

Issue:
Remove duplicate-keys in `ivy\functional\backends\numpy\__init__.py`
In the file: `ivy\functional\backends\numpy\__init__.py` duplicate keys are present in the following lines
https://github.com/unifyai/ivy/blob/1be0f8c2c8d916b10f06ab538b43fc506a1992a6/ivy/functional/backends/numpy/__init__.py#L25
https://github.com/unifyai/ivy/blob/1be0f8c2c8d916b10f06ab538b43fc506a1992a6/ivy/functional/backends/numpy/__init__.py#L40
https://github.com/unifyai/ivy/blob/1be0f8c2c8d916b10f06ab538b43fc506a1992a6/ivy/functional/backends/numpy/__init__.py#L31
https://github.com/unifyai/ivy/blob/1be0f8c2c8d916b10f06ab538b43fc506a1992a6/ivy/functional/backends/numpy/__init__.py#L37
They can be removed.


Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/numpy/__init__.py b/ivy/functional/backends/numpy/__init__.py
--- a/ivy/functional/backends/numpy/__init__.py
+++ b/ivy/functional/backends/numpy/__init__.py
@@ -34,10 +34,8 @@ def rep_method(self, ufunc, method, *inputs, **kwargs):
             "bitwise_and": "bitwise_and",
             "matmul": "matmul",
             "power": "pow",
-            "divide": "divide",
             "subtract": "subtract",
             "add": "add",
-            "not_equal": "not_equal",
         }
         if ufunc.__name__ in methods.keys():
             return eval("ivy." + methods[ufunc.__name__] + "(*inputs, **kwargs)")


Test patch: