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

Issue:
squeeze



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/array.py b/ivy/functional/frontends/jax/array.py
--- a/ivy/functional/frontends/jax/array.py
+++ b/ivy/functional/frontends/jax/array.py
@@ -106,6 +106,9 @@ def argmin(
             keepdims=keepdims,
         )
 
+    def squeeze(self, axis=None):
+        return jax_frontend.numpy.squeeze(self, axis=axis)
+
     def conj(self, /):
         return jax_frontend.numpy.conj(self._ivy_array)
 


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_array.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_array.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_array.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_array.py
@@ -152,6 +152,14 @@ def _searchsorted(draw):
     return input_dtypes, xs, side, sorter
 
 
+# squeeze
+@st.composite
+def _squeeze_helper(draw):
+    shape = draw(st.shared(helpers.get_shape(), key="shape"))
+    valid_axes = [idx for idx in range(len(shape)) if shape[idx] == 1] + [None]
+    return draw(st.sampled_from(valid_axes))
+
+
 @st.composite
 def _transpose_helper(draw):
     dtype_x = draw(
@@ -2451,6 +2459,45 @@ def test_jax_array_sort(
     )
 
 
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="jax.numpy.array",
+    method_name="squeeze",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        shape=st.shared(helpers.get_shape(), key="shape"),
+    ),
+    axis=_squeeze_helper(),
+)
+def test_jax_array_squeeze(
+    dtype_and_x,
+    axis,
+    on_device,
+    frontend,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    backend_fw,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        on_device=on_device,
+        init_all_as_kwargs_np={
+            "object": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={
+            "axis": axis,
+        },
+        frontend=frontend,
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+    )
+
+
 # var
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
tanh_



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
@@ -49,8 +49,12 @@ def rsqrt_(x, name=None):
 def sqrt_(x, name=None):
     return ivy.inplace_update(x, sqrt(x))
 
-
 @with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
 @to_ivy_arrays_and_back
 def subtract_(x, y, name=None):
     return ivy.inplace_update(x, subtract(x, y))
+
+@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def tanh_(x, name=None):
+    return ivy.inplace_update(x, tanh(x))


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
@@ -179,7 +179,6 @@ def test_paddle_rsqrt_(
         x=x[0],
     )
 
-
 # sqrt_
 @handle_frontend_test(
     fn_tree="paddle.tensor.math.sqrt_",
@@ -206,8 +205,6 @@ def test_paddle_sqrt_(
         on_device=on_device,
         x=x[0],
     )
-
-
 # subtract_
 @handle_frontend_test(
     fn_tree="paddle.tensor.math.subtract_",
@@ -241,3 +238,31 @@ def test_paddle_subtract_(
         x=x[0],
         y=x[1],
     )
+
+#tanh_
+@handle_frontend_test(
+    fn_tree="paddle.tensor.math.tanh_",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+)
+def test_paddle_tanh_(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        atol=1e-2,
+        x=x[0],
+    )
Repository: ivy-llc/ivy

Issue:
meshgrid



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/tensorflow/general_functions.py b/ivy/functional/frontends/tensorflow/general_functions.py
--- a/ivy/functional/frontends/tensorflow/general_functions.py
+++ b/ivy/functional/frontends/tensorflow/general_functions.py
@@ -285,6 +285,16 @@ def linspace(start, stop, num, name=None, axis=0):
     return ivy.linspace(start, stop, num, axis=axis)
 
 
+@to_ivy_arrays_and_back
+def meshgrid(*args, **kwargs):
+    sparse = False
+    indexing = "xy"
+    if "indexing" in kwargs:
+        indexing = kwargs["indexing"]
+
+    return ivy.meshgrid(*args, sparse=sparse, indexing=indexing)
+
+
 @to_ivy_arrays_and_back
 def no_op(name=None):
     return


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_general_functions.py b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_general_functions.py
--- a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_general_functions.py
+++ b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_general_functions.py
@@ -1151,6 +1151,51 @@ def test_tensorflow_linspace(
     )
 
 
+# meshgrid
+@handle_frontend_test(
+    fn_tree="tensorflow.meshgrid",
+    dtype_and_values=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("integer"),
+        max_num_dims=2,
+        min_num_dims=2,
+        min_dim_size=2,
+        max_dim_size=5,
+    ),
+    indexing=st.sampled_from(["xy", "ij"]),
+    test_with_out=st.just(False),
+)
+def test_tensorflow_meshgrid(
+    *,
+    dtype_and_values,
+    indexing,
+    on_device,
+    fn_tree,
+    frontend,
+    backend_fw,
+    test_flags,
+):
+    dtype, arrays = dtype_and_values
+    arrays = arrays[0]
+    kwargs = {}
+
+    for i, array in enumerate(arrays):
+        kwargs[f"a{i}"] = array
+
+    kwargs["indexing"] = indexing
+
+    test_flags.num_positional_args = len(arrays)
+    test_flags.generate_frontend_arrays = False
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        **kwargs,
+    )
+
+
 # no_op
 @handle_frontend_test(
     fn_tree="tensorflow.no_op",
Repository: ivy-llc/ivy

Issue:
 logistic



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/random.py b/ivy/functional/frontends/jax/random.py
--- a/ivy/functional/frontends/jax/random.py
+++ b/ivy/functional/frontends/jax/random.py
@@ -247,6 +247,17 @@ def loggamma(key, a, shape=None, dtype="float64"):
     return ivy.log(ivy.gamma(a, 1.0, shape=shape, dtype=dtype, seed=seed))
 
 
+@handle_jax_dtype
+@to_ivy_arrays_and_back
+@with_unsupported_dtypes(
+    {"0.4.14 and below": ("float16", "bfloat16")},
+)
+def logistic(key, shape=(), dtype="float64"):
+    seed = _get_seed(key)
+    uniform_x = ivy.random_uniform(seed=seed, shape=shape, dtype=dtype)
+    return ivy.log(ivy.divide(uniform_x, ivy.subtract(1.0, uniform_x)))
+
+
 @handle_jax_dtype
 @to_ivy_arrays_and_back
 @with_unsupported_dtypes(


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_random.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_random.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_random.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_random.py
@@ -820,6 +820,62 @@ def call():
         assert u.shape == v.shape
 
 
+@pytest.mark.xfail
+@handle_frontend_test(
+    fn_tree="jax.random.logistic",
+    dtype_key=helpers.dtype_and_values(
+        available_dtypes=["uint32"],
+        min_value=0,
+        max_value=2000,
+        min_num_dims=1,
+        max_num_dims=1,
+        min_dim_size=2,
+        max_dim_size=2,
+    ),
+    shape=helpers.get_shape(allow_none=False, min_num_dims=1, min_dim_size=1),
+    dtype=helpers.get_dtypes("float", full=False),
+    test_with_out=st.just(False),
+)
+def test_jax_logistic(
+    *,
+    dtype_key,
+    shape,
+    dtype,
+    on_device,
+    fn_tree,
+    frontend,
+    backend_fw,
+    test_flags,
+):
+    input_dtype, key = dtype_key
+
+    def call():
+        return 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,
+            key=key[0],
+            shape=shape,
+            dtype=dtype[0],
+            test_values=False,
+        )
+
+    ret = call()
+
+    if not ivy.exists(ret):
+        return
+
+    ret_np, ret_from_np = ret
+    ret_np = helpers.flatten_and_to_np(ret=ret_np, backend=backend_fw)
+    ret_from_np = helpers.flatten_and_to_np(ret=ret_from_np, backend=backend_fw)
+    for u, v in zip(ret_np, ret_from_np):
+        assert u.dtype == v.dtype
+        assert u.shape == v.shape
+
+
 @pytest.mark.xfail
 @handle_frontend_test(
     fn_tree="jax.random.maxwell",
Repository: ivy-llc/ivy

Issue:
nansum



Discussion:
#13 

Resolving patch:
diff --git a/ivy/functional/frontends/torch/reduction_ops.py b/ivy/functional/frontends/torch/reduction_ops.py
--- a/ivy/functional/frontends/torch/reduction_ops.py
+++ b/ivy/functional/frontends/torch/reduction_ops.py
@@ -190,6 +190,11 @@ def moveaxis(input, source, destination):
 def nanmean(input, dim=None, keepdim=False, *, dtype=None, out=None):
     return ivy.nanmean(input, axis=dim, keepdims=keepdim, dtype=dtype, out=out)
 
+@numpy_to_torch_style_args
+@to_ivy_arrays_and_back
+def nansum(input, dim=None, keepdim=False, dtype=None, out=None):
+    return ivy.nansum(input, axis=dim, keepdims=keepdim, dtype=dtype, out=out)
+
 
 @to_ivy_arrays_and_back
 @with_supported_dtypes(


Test patch:
diff --git a/.idea/runConfigurations/_template__of_py_test.xml b/.idea/runConfigurations/_template__of_py_test.xml
--- a/.idea/runConfigurations/_template__of_py_test.xml
+++ b/.idea/runConfigurations/_template__of_py_test.xml
@@ -50,4 +50,4 @@
     <option name="_new_targetType" value="&quot;PYTHON&quot;" />
     <method v="2" />
   </configuration>
-</component>
+</component>
\ No newline at end of file
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_reduction_ops.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_reduction_ops.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_reduction_ops.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_reduction_ops.py
@@ -671,6 +671,39 @@ def test_torch_nanmean(
         keepdim=keepdims,
     )
 
+@handle_frontend_test(
+    fn_tree="torch.nansum",
+    dtype_and_x=_statistical_dtype_values(
+        function="nansum",
+        min_value=-1e04,
+        max_value=1e04,
+    ),
+    keepdims=st.booleans(),
+)
+def test_torch_nansum(
+    *,
+    dtype_and_x,
+    keepdims,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    input_dtype, x, axis = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        input=x[0],
+        dim=axis,
+        keepdim=keepdims,
+        rtol=1e-02,
+        atol=1e-02,
+    )
 
 # norm
 @handle_frontend_test(
Repository: ivy-llc/ivy

Issue:
std



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/jax/array.py b/ivy/functional/frontends/jax/array.py
--- a/ivy/functional/frontends/jax/array.py
+++ b/ivy/functional/frontends/jax/array.py
@@ -384,6 +384,19 @@ def min(
             self, axis=axis, out=out, keepdims=keepdims, where=where
         )
 
+    def std(
+        self, axis=None, dtype=None, out=None, ddof=0, keepdims=False, *, where=None
+    ):
+        return jax_frontend.numpy.std(
+            self,
+            axis=axis,
+            dtype=dtype,
+            out=out,
+            ddof=ddof,
+            keepdims=keepdims,
+            where=where,
+        )
+
     def var(
         self, *, axis=None, dtype=None, out=None, ddof=False, keepdims=False, where=None
     ):


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_jax/test_array.py b/ivy_tests/test_ivy/test_frontends/test_jax/test_array.py
--- a/ivy_tests/test_ivy/test_frontends/test_jax/test_array.py
+++ b/ivy_tests/test_ivy/test_frontends/test_jax/test_array.py
@@ -2498,6 +2498,48 @@ def test_jax_array_squeeze(
     )
 
 
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="jax.numpy.array",
+    method_name="std",
+    dtype_x_axis=helpers.dtype_values_axis(
+        available_dtypes=helpers.get_dtypes("valid")
+    ),
+    ddof=st.booleans(),
+    keepdims=st.booleans(),
+)
+def test_jax_array_std(
+    dtype_x_axis,
+    backend_fw,
+    frontend,
+    ddof,
+    keepdims,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    on_device,
+):
+    input_dtype, x, axis = dtype_x_axis
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        init_all_as_kwargs_np={
+            "object": x,
+        },
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={
+            "axis": axis,
+            "ddof": ddof,
+            "keepdims": keepdims,
+        },
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        on_device=on_device,
+    )
+
+
 # var
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
tanh_
To-do list: #15115


Discussion:

Resolving patch:
diff --git a/ivy/functional/backends/paddle/statistical.py b/ivy/functional/backends/paddle/statistical.py
--- a/ivy/functional/backends/paddle/statistical.py
+++ b/ivy/functional/backends/paddle/statistical.py
@@ -9,6 +9,7 @@
 from ivy.func_wrapper import (
     with_supported_dtypes,
     with_unsupported_dtypes,
+    with_supported_device_and_dtypes,
 )
 import ivy.functional.backends.paddle as paddle_backend
 from ivy.utils.einsum_parser import legalise_einsum_expr
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
@@ -744,6 +744,11 @@ def remainder(self, y, name=None):
     def is_floating_point(self):
         return paddle_frontend.is_floating_point(self)
 
+    @with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
+    def tanh_(self, name=None):
+        y = self.tanh(self)
+        return ivy.inplace_update(self, y)
+
     @with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
     def reciprocal_(self, name=None):
         y = self.reciprocal(self)


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
@@ -3990,6 +3990,41 @@ def test_paddle_tensor_tanh(
     )
 
 
+# tanh_
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="paddle.to_tensor",
+    method_name="tanh_",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+)
+def test_paddle_tensor_tanh_(
+    dtype_and_x,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    on_device,
+    backend_fw,
+):
+    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={
+            "data": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        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,
+    )
+
+
 # topk
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
reciprocal_
To-do list: #15115


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
@@ -725,6 +725,11 @@ def remainder(self, y, name=None):
     def is_floating_point(self):
         return paddle_frontend.is_floating_point(self)
 
+    @with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
+    def reciprocal_(self, name=None):
+        y = self.reciprocal(self)
+        return ivy.inplace_update(self, y)
+
     @with_unsupported_dtypes(
         {"2.5.1 and below": ("complex", "uint8", "uint16")}, "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
@@ -3054,6 +3054,41 @@ def test_paddle_tensor_reciprocal(
     )
 
 
+# reciprocal_
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="paddle.to_tensor",
+    method_name="reciprocal_",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+)
+def test_paddle_tensor_reciprocal_(
+    dtype_and_x,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    on_device,
+    backend_fw,
+):
+    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={
+            "data": x[0],
+        },
+        method_input_dtypes=input_dtype,
+        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,
+    )
+
+
 # remainder
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
exponential



Discussion:
#23051

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
@@ -70,6 +70,16 @@ def dirichlet(alpha, size=None):
     return ivy.dirichlet(alpha, size=size)
 
 
+@to_ivy_arrays_and_back
+@from_zero_dim_arrays_to_scalar
+def exponential(scale=1.0, size=None, dtype="float64"):
+    if scale > 0:
+        #Generate samples that are uniformly distributed based on given parameters
+        u = ivy.random_uniform(low=0.0, high=0.0, shape=size, dtype=dtype)
+        return ivy.exp(scale, out=u)
+    return 0    #if scale parameter is less than or equal to 0
+
+
 @to_ivy_arrays_and_back
 @from_zero_dim_arrays_to_scalar
 def f(dfn, dfd, size=None):
@@ -310,3 +320,4 @@ def zipf(a, size=None):
         return 0
     u = ivy.random_uniform(low=0.0, high=1.0, shape=size, dtype="float64")
     return ivy.floor(ivy.pow(1 / (1 - u), 1 / a))
+


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
@@ -217,6 +217,41 @@ def test_numpy_dirichlet(
     )
 
 
+# exponential
+@handle_frontend_test(
+    fn_tree="numpy.random.exponential",
+    input_dtypes=helpers.get_dtypes("float", index=2),
+    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_exponential(
+    input_dtypes,
+    size,
+    frontend,
+    test_flags,
+    fn_tree,
+    on_device,
+    backend_fw,
+    scale,
+):
+    helpers.test_frontend_function(
+        input_dtypes=input_dtypes,
+        backend_to_test=backend_fw,
+        test_flags=test_flags,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        test_values=False,
+        scale=scale,
+        size=size,
+    )
+
+
 @handle_frontend_test(
     fn_tree="numpy.random.f",
     input_dtypes=helpers.get_dtypes("float"),
@@ -1204,3 +1239,4 @@ def test_numpy_zipf(
         a=a,
         size=size,
     )
+
Repository: ivy-llc/ivy

Issue:
nanmean



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/math.py b/ivy/functional/frontends/paddle/math.py
--- a/ivy/functional/frontends/paddle/math.py
+++ b/ivy/functional/frontends/paddle/math.py
@@ -376,6 +376,12 @@ def multiply(x, y, name=None):
     return ivy.multiply(x, y)
 
 
+@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def nanmean(x, axis=None, keepdims=False):
+    return ivy.nanmean(x, axis=axis, keepdims=keepdims)
+
+
 @with_supported_dtypes(
     {"2.5.1 and below": ("float32", "float64", "int32", "int64")}, "paddle"
 )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_math.py
@@ -1622,6 +1622,37 @@ def test_paddle_multiply(
     )
 
 
+@handle_frontend_test(
+    fn_tree="paddle.nanmean",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        num_arrays=1,
+        allow_nan=True,
+    ),
+)
+def test_paddle_nanmean(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    backend_fw,
+    test_flags,
+):
+    input_dtype, x = dtype_and_x
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        fn_tree=fn_tree,
+        test_flags=test_flags,
+        on_device=on_device,
+        x=x[0],
+        rtol=1e-04,
+        atol=1e-04,
+    )
+
+
 # nansum
 @handle_frontend_test(
     fn_tree="paddle.nansum",