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

Issue:
astype



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/devicearray.py b/ivy/functional/frontends/jax/devicearray.py
--- a/ivy/functional/frontends/jax/devicearray.py
+++ b/ivy/functional/frontends/jax/devicearray.py
@@ -56,6 +56,14 @@ def all(self, *, axis=None, out=None, keepdims=False):
             self._ivy_array, axis=axis, keepdims=keepdims, out=out
         )
 
+    def astype(self, dtype):
+        try:
+            return jax_frontend.numpy.asarray(self, dtype=dtype)
+        except:
+            raise ivy.utils.exceptions.IvyException(
+                f"Dtype {self.dtype} is not castable to {dtype}"
+            )
+
     def argmax(
         self,
         /,


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
@@ -187,6 +187,39 @@ def test_jax_devicearray_all(
     )
 
 
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="jax.numpy.array",
+    method_name="astype",
+    dtype_and_x=_get_castable_dtype(),
+)
+def test_jax_devicearray_astype(
+    dtype_and_x,
+    on_device,
+    frontend,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+):
+    input_dtype, x, _, castable_dtype = dtype_and_x
+
+    helpers.test_frontend_method(
+        init_input_dtypes=[input_dtype],
+        init_all_as_kwargs_np={
+            "object": x[0],
+        },
+        method_input_dtypes=[input_dtype],
+        method_all_as_kwargs_np={
+            "dtype": castable_dtype,
+        },
+        frontend=frontend,
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        on_device=on_device,
+    )
+
+
 @handle_frontend_method(
     class_tree=CLASS_TREE,
     init_tree="jax.numpy.array",
Repository: ivy-llc/ivy

Issue:
copy



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/devicearray.py b/ivy/functional/frontends/jax/devicearray.py
--- a/ivy/functional/frontends/jax/devicearray.py
+++ b/ivy/functional/frontends/jax/devicearray.py
@@ -44,6 +44,9 @@ def at(self):
     # Instance Methods #
     # ---------------- #
 
+    def copy(self, order=None):
+        return jax_frontend.numpy.copy(self._ivy_array, order=order)
+
     def all(self, *, axis=None, out=None, keepdims=False):
         return jax_frontend.numpy.all(
             self._ivy_array, axis=axis, keepdims=keepdims, out=out


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
@@ -90,6 +90,39 @@ def test_jax_devicearray_property_at(x_y_index):
     assert x.at[idx].get() == x[idx]
 
 
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="jax.numpy.array",
+    method_name="copy",
+    dtype_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        min_num_dims=1,
+    ),
+)
+def test_jax_devicearray_copy(
+    dtype_x,
+    on_device,
+    frontend,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+):
+    input_dtype, x = dtype_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={
+            "object": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={},
+        frontend=frontend,
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        on_device=on_device,
+    )
+
+
 @handle_frontend_method(
     class_tree=CLASS_TREE,
     init_tree="jax.numpy.array",
Repository: ivy-llc/ivy

Issue:
diagonal



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/devicearray.py b/ivy/functional/frontends/jax/devicearray.py
--- a/ivy/functional/frontends/jax/devicearray.py
+++ b/ivy/functional/frontends/jax/devicearray.py
@@ -51,6 +51,11 @@ def T(self):
     def copy(self, order=None):
         return jax_frontend.numpy.copy(self._ivy_array, order=order)
 
+    def diagonal(self, offset=0, axis1=0, axis2=1):
+        return jax_frontend.numpy.diagonal(
+            self._ivy_array, offset=offset, axis1=axis1, axis2=axis2
+        )
+
     def all(self, *, axis=None, out=None, keepdims=False):
         return jax_frontend.numpy.all(
             self._ivy_array, axis=axis, keepdims=keepdims, out=out


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
@@ -147,6 +147,39 @@ def test_jax_devicearray_copy(
     )
 
 
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="jax.numpy.array",
+    method_name="diagonal",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        min_num_dims=2,
+    ),
+)
+def test_jax_devicearray_diagonal(
+    dtype_and_x,
+    on_device,
+    frontend,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={
+            "object": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={},
+        frontend=frontend,
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        on_device=on_device,
+    )
+
+
 @handle_frontend_method(
     class_tree=CLASS_TREE,
     init_tree="jax.numpy.array",
Repository: ivy-llc/ivy

Issue:
flatten



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/devicearray.py b/ivy/functional/frontends/jax/devicearray.py
--- a/ivy/functional/frontends/jax/devicearray.py
+++ b/ivy/functional/frontends/jax/devicearray.py
@@ -109,6 +109,8 @@ def ravel(self, order="C"):
             order=order,
         )
 
+    flatten = ravel
+
     def sort(self, axis=-1, order=None):
         return jax_frontend.numpy.sort(
             self,


Test patch:
Repository: ivy-llc/ivy

Issue:
Einsum



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
@@ -920,3 +920,22 @@ def Svd(*, input, full_matrices=False, compute_uv=True, name=None):
         "complex128",
     ),
 }
+
+
+Einsum = to_ivy_arrays_and_back(
+    with_supported_dtypes(
+        {
+            "2.13.0 and below": (
+                "bfloat16",
+                "complex128 ",
+                "complex64",
+                "float64",
+                "float32",
+                "float16",
+                "int64",
+                "int32"
+            ),
+        },
+        "tensorflow",
+    )(map_raw_ops_alias(tf_frontend.general_functions.einsum))
+)


Test patch:
Repository: ivy-llc/ivy

Issue:
l1_loss



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/loss.py b/ivy/functional/frontends/paddle/nn/functional/loss.py
--- a/ivy/functional/frontends/paddle/nn/functional/loss.py
+++ b/ivy/functional/frontends/paddle/nn/functional/loss.py
@@ -164,3 +164,18 @@ def smooth_l1_loss(
     elif reduction == "sum":
         out = ivy.sum(out)
     return out.astype(label.dtype)
+
+
+@inputs_to_ivy_arrays
+def l1_loss(
+    input,
+    label,
+    reduction="mean",
+    name=None,
+):
+    sum_diff = ivy.abs(input - label)
+    reduction = _get_reduction_func(reduction)
+    out = reduction(sum_diff)
+    if out.shape == ():
+        out = out.expand_dims()
+    return paddle.to_tensor(out)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_loss.py
@@ -268,3 +268,32 @@ def test_paddle_smooth_l1_loss(
         reduction=reduction,
         delta=delta,
     )
+
+
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.l1_loss",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        num_arrays=2,
+        shared_dtype=True,
+        min_num_dims=2,
+        max_num_dims=5,
+        min_dim_size=1,
+        max_dim_size=10,
+    ),
+    reduction=st.sampled_from(["mean", "sum", "none"]),
+)
+def test_paddle_l1_loss(
+    dtype_and_x, reduction, on_device, fn_tree, frontend, test_flags
+):
+    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,
+        input=x[0],
+        label=x[1],
+        reduction=reduction,
+    )
Repository: ivy-llc/ivy

Issue:
iinfo



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/numpy/dtype.py b/ivy/functional/frontends/jax/numpy/dtype.py
--- a/ivy/functional/frontends/jax/numpy/dtype.py
+++ b/ivy/functional/frontends/jax/numpy/dtype.py
@@ -85,6 +85,15 @@ def result_type(*args):
     return ivy.result_type(*args)
 
 
+@with_supported_dtypes(
+    {"2.13.0 and below": ("integer",)},
+    "jax",
+)
+@to_ivy_arrays_and_back
+def iinfo(int_type):
+    return ivy.iinfo(int_type)
+
+
 @with_supported_dtypes(
     {"2.13.0 and below": ("float16", "float32", "float64")},
     "jax",


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_dtype.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_dtype.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_dtype.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_numpy/test_dtype.py
@@ -104,6 +104,24 @@ def test_jax_result_type(
     )
 
 
+@handle_frontend_test(
+    fn_tree="jax.numpy.iinfo",
+    dtype=helpers.get_dtypes("numeric", full=False),
+    test_with_out=st.just(False),
+)
+@settings(max_examples=200)
+def test_jax_iinfo(*, dtype, test_flags, on_device, fn_tree, frontend, backend_fw):
+    helpers.test_frontend_function(
+        input_dtypes=[],
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        int_type=dtype[0],
+        backend_to_test=backend_fw,
+    )
+
+
 @handle_frontend_test(
     fn_tree="jax.numpy.finfo",
     dtype=helpers.get_dtypes("numeric", full=False),
Repository: ivy-llc/ivy

Issue:
gamma



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/numpy/random/functions.py b/ivy/functional/frontends/numpy/random/functions.py
--- a/ivy/functional/frontends/numpy/random/functions.py
+++ b/ivy/functional/frontends/numpy/random/functions.py
@@ -183,3 +183,9 @@ def gumbel(loc=0.0, scale=1.0, size=None):
     u = ivy.random_uniform(low=0.0, high=1.0, shape=size, dtype="float64")
     x = loc - scale * ivy.log(-ivy.log(u))
     return x
+
+
+@to_ivy_arrays_and_back
+@from_zero_dim_arrays_to_scalar
+def gamma(shape, scale=1.0, size=None):
+    return ivy.gamma(shape, scale, shape=size, dtype="float64")


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py b/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py
--- a/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py
+++ b/ivy_tests/test_ivy/test_frontends/test_numpy/test_random/test_functions.py
@@ -707,3 +707,40 @@ def test_numpy_gumbel(
         scale=scale,
         size=size,
     )
+
+
+@handle_frontend_test(
+    fn_tree="numpy.random.gamma",
+    input_dtypes=helpers.get_dtypes("float", full=False),
+    shape=st.floats(
+        allow_nan=False, allow_infinity=False, width=32, min_value=0, exclude_min=True
+    ),
+    scale=st.floats(
+        allow_nan=False, allow_infinity=False, width=32, min_value=0, exclude_min=True
+    ),
+    size=st.tuples(
+        st.integers(min_value=2, max_value=5), st.integers(min_value=2, max_value=5)
+    ),
+    test_with_out=st.just(False),
+)
+def test_numpy_gamma(
+    input_dtypes,
+    shape,
+    scale,
+    size,
+    frontend,
+    test_flags,
+    fn_tree,
+    on_device,
+):
+    helpers.test_frontend_function(
+        input_dtypes=input_dtypes,
+        test_flags=test_flags,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        test_values=False,
+        shape=shape,
+        scale=scale,
+        size=size,
+    )
Repository: ivy-llc/ivy

Issue:
ifftshift



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/fft.py b/ivy/functional/frontends/paddle/fft.py
--- a/ivy/functional/frontends/paddle/fft.py
+++ b/ivy/functional/frontends/paddle/fft.py
@@ -54,3 +54,31 @@ def fftshift(x, axes=None, name=None):
 def ifft(x, n=None, axis=-1.0, norm="backward", name=None):
     ret = ivy.ifft(ivy.astype(x, "complex128"), axis, norm=norm, n=n)
     return ivy.astype(ret, x.dtype)
+
+
+@with_supported_dtypes(
+    {
+        "2.5.0 and below": (
+            "int32",
+            "int64",
+            "float32",
+            "float64",
+        )
+    },
+    "paddle",
+)
+@to_ivy_arrays_and_back
+def ifftshift(x, axes=None, name=None):
+    shape = x.shape
+
+    if axes is None:
+        axes = tuple(range(x.ndim))
+        shifts = [-(dim // 2) for dim in shape]
+    elif isinstance(axes, int):
+        shifts = -(shape[axes] // 2)
+    else:
+        shifts = ivy.concat([-shape[ax] // 2 for ax in axes])
+
+    roll = ivy.roll(x, shifts, axis=axes)
+
+    return roll


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_fft.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_fft.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_fft.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_fft.py
@@ -105,3 +105,28 @@ def test_paddle_ifft(
         axis=axis,
         norm=norm,
     )
+
+
+@handle_frontend_test(
+    fn_tree="paddle.fft.ifftshift",
+    dtype_x_axis=helpers.dtype_values_axis(
+        available_dtypes=helpers.get_dtypes("valid"),
+        min_value=-10,
+        max_value=10,
+        min_num_dims=1,
+        valid_axis=True,
+        force_int_axis=True,
+    ),
+)
+def test_paddle_ifftshift(dtype_x_axis, frontend, test_flags, fn_tree, on_device):
+    input_dtype, x, axes = dtype_x_axis
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        test_values=True,
+        x=x[0],
+        axes=axes,
+    )
Repository: ivy-llc/ivy

Issue:
var



Discussion:
This issue has been labelled as stale. If you would like to continue working on this issue, then please add another comment or create a PR . If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. For more information please refer to this page in our documentation: https://lets-unify.ai/ivy/contributing/1_the_basics.html#todo-list-issues

Resolving patch:
diff --git a/ivy/functional/frontends/jax/devicearray.py b/ivy/functional/frontends/jax/devicearray.py
--- a/ivy/functional/frontends/jax/devicearray.py
+++ b/ivy/functional/frontends/jax/devicearray.py
@@ -254,3 +254,16 @@ def __iter__(self):
 
     def round(self, decimals=0):
         return jax_frontend.numpy.round(self, decimals)
+
+    def var(
+        self, *, axis=None, dtype=None, out=None, ddof=False, keepdims=False, where=None
+    ):
+        return jax_frontend.numpy.var(
+            self._ivy_array,
+            axis=axis,
+            dtype=dtype,
+            out=out,
+            ddof=int(ddof),
+            keepdims=keepdims,
+            where=where,
+        )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_devicearray.py
@@ -1902,3 +1902,52 @@ def test_jax_devicearray_round(
         method_flags=method_flags,
         on_device=on_device,
     )
+
+
+# var
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="jax.numpy.array",
+    method_name="var",
+    dtype_and_x=helpers.dtype_values_axis(
+        available_dtypes=helpers.get_dtypes("float"),
+        large_abs_safety_factor=24,
+        small_abs_safety_factor=24,
+        safety_factor_scale="log",
+        force_int_axis=True,
+        min_num_dims=1,
+        valid_axis=True,
+    ),
+    ddof=st.booleans(),
+    keepdims=st.booleans(),
+)
+def test_jax_devicearray_var(
+    dtype_and_x,
+    keepdims,
+    on_device,
+    frontend,
+    ddof,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+):
+    input_dtype, x, axis = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={
+            "object": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={
+            "axis": axis,
+            "ddof": ddof,  # You can adjust the ddof value as needed
+            "keepdims": keepdims,
+        },
+        frontend=frontend,
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        on_device=on_device,
+        rtol_=1e-3,
+        atol_=1e-3,
+    )
Repository: ivy-llc/ivy

Issue:
bernoulli



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
@@ -1011,6 +1011,10 @@ def addr_(self, vec1, vec2, *, beta=1, alpha=1):
     def dot(self, tensor):
         return torch_frontend.dot(self, tensor)
 
+    @with_supported_dtypes({"2.0.1 and below": ("float32", "float64")}, "torch")
+    def bernoulli(self, *, generator=None, out=None):
+        return torch_frontend.bernoulli(self._ivy_array, generator=generator, out=out)
+
     # Special Methods #
     # -------------------#
 


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
@@ -1726,6 +1726,38 @@ def test_torch_instance_aminmax(
     )
 
 
+# bernoulli
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="torch.tensor",
+    method_name="bernoulli",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+    test_with_out=st.just(True),
+)
+def test_torch_instance_bernoulli(
+    dtype_and_x,
+    frontend,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={
+            "input": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={"generator": x[1], "out": x[2]},
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend=frontend,
+    )
+
+
 # contiguous
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
lerp



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -352,3 +352,9 @@ def asinh(x, name=None):
 @to_ivy_arrays_and_back
 def max(x, axis=None, keepdim=False, name=None):
     return ivy.max(x, axis=axis, keepdims=keepdim)
+
+
+@with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def lerp(x, y, weight, name=None):
+    return ivy.lerp(x, y, weight)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_math.py
@@ -1468,3 +1468,37 @@ def test_paddle_max(
         axis=axis,
         keepdim=False,
     )
+
+
+# lerp
+@handle_frontend_test(
+    fn_tree="paddle.tensor.math.lerp",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        num_arrays=3,
+        allow_inf=False,
+        large_abs_safety_factor=2,
+        small_abs_safety_factor=2,
+        safety_factor_scale="log",
+        shared_dtype=True,
+    ),
+)
+def test_paddle_lerp(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        test_flags=test_flags,
+        on_device=on_device,
+        x=x[0],
+        y=x[1],
+        weight=x[2],
+    )
Repository: ivy-llc/ivy

Issue:
rfftn



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
@@ -133,3 +133,10 @@ def ifftn(a, s=None, axes=None, 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 rfftn(a, s=None, axes=None, norm=None):
+    a = ivy.asarray(a, dtype=ivy.complex128)
+    return ivy.rfftn(a, s=s, axes=axes, norm=norm)


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
@@ -6,6 +6,7 @@
 from ivy_tests.test_ivy.helpers import handle_frontend_test
 from ivy_tests.test_ivy.test_functional.test_experimental.test_nn.test_layers import (
     x_and_ifft,
+    x_and_rfftn,
 )
 
 # ivy_tests/test_ivy/test_functional/test_experimental/test_nn/test_layers.py
@@ -212,3 +213,23 @@ def test_numpy_ifftn(dtype_and_x, frontend, test_flags, fn_tree, on_device):
         axes=None,
         norm=norm,
     )
+
+
+@handle_frontend_test(
+    fn_tree="numpy.fft.rfftn",
+    dtype_and_x=x_and_rfftn(),
+)
+def test_numpy_rfftn(dtype_and_x, frontend, test_flags, fn_tree, on_device):
+    dtype, x, s, axes, norm = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        test_values=True,
+        a=x,
+        s=s,
+        axes=axes,
+        norm=norm,
+    )