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

Issue:
expm



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/tensorflow/linalg.py b/ivy/functional/frontends/tensorflow/linalg.py
--- a/ivy/functional/frontends/tensorflow/linalg.py
+++ b/ivy/functional/frontends/tensorflow/linalg.py
@@ -362,3 +362,20 @@ def tensor_diag(diagonal, /, *, name=None):
     if rank > 1:
         raise ValueError("wrong tensor rank, at most 1")
     return ivy.diag(diagonal)
+
+
+@to_ivy_arrays_and_back
+@with_supported_dtypes(
+    {
+        "2.13.0 and below": (
+            "float16",
+            "float32",
+            "float64",
+            "complex64",
+            "complex128",
+        )
+    },
+    "tensorflow",
+)
+def expm(input, name=None):
+    return ivy.matrix_exp(input)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_linalg.py b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_linalg.py
--- a/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_linalg.py
+++ b/ivy_tests/test_ivy/test_frontends/test_tensorflow/test_linalg.py
@@ -1133,3 +1133,37 @@ def test_tensorflow_tensor_diag(
         on_device=on_device,
         diagonal=x[0],
     )
+
+
+@handle_frontend_test(
+    fn_tree="tensorflow.linalg.expm",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        num_arrays=1,
+        min_value=1,
+        max_value=10,
+        shape=helpers.ints(min_value=3, max_value=3).map(lambda x: tuple([x, x])),
+    ).filter(lambda x: "float16" not in x[0]),
+    test_with_out=st.just(False),
+)
+def test_tensorflow_expm(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    backend_fw,
+    test_flags,
+):
+    dtype, x = dtype_and_x
+    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,
+        input=x[0],
+        atol=1,
+        rtol=1e-01,
+    )
Repository: ivy-llc/ivy

Issue:
rank



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/attribute.py b/ivy/functional/frontends/paddle/tensor/attribute.py
--- a/ivy/functional/frontends/paddle/tensor/attribute.py
+++ b/ivy/functional/frontends/paddle/tensor/attribute.py
@@ -20,6 +20,11 @@ def is_floating_point(x):
     return ivy.is_float_dtype(x)
 
 
+@to_ivy_arrays_and_back
+def rank(input):
+    return ivy.get_num_dims(input)
+
+
 @to_ivy_arrays_and_back
 def real(x):
     return ivy.real(x)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_attribute.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_attribute.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_attribute.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_attribute.py
@@ -86,6 +86,33 @@ def test_paddle_is_floating_point(
     )
 
 
+@handle_frontend_test(
+    fn_tree="paddle.tensor.attribute.rank",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+)
+def test_paddle_rank(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    backend_fw,
+    test_flags,
+):
+    input_dtype, input = 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,
+        input=input[0],
+    )
+
+
 @handle_frontend_test(
     fn_tree="paddle.tensor.attribute.real",
     dtype_and_x=helpers.dtype_and_values(
Repository: ivy-llc/ivy

Issue:
randint_like
Add randint_like function to pytorch frontend


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/random_sampling.py b/ivy/functional/frontends/torch/random_sampling.py
--- a/ivy/functional/frontends/torch/random_sampling.py
+++ b/ivy/functional/frontends/torch/random_sampling.py
@@ -230,3 +230,26 @@ def randperm(
     arr = ivy.arange(n, device=device, dtype=dtype)
     ret = ivy.shuffle(arr, seed=seed, out=out)
     return ret
+
+
+@to_ivy_arrays_and_back
+def randint_like(
+    input,
+    low,
+    high,
+    *,
+    dtype=None,
+    layout=None,
+    device=None,
+    requires_grad=False,
+    memory_format=None,
+):
+    shape = input.shape
+
+    return ivy.randint(
+        low,
+        high,
+        shape=shape,
+        device=device,
+        dtype=dtype,
+    )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_random_sampling.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_random_sampling.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_random_sampling.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_random_sampling.py
@@ -479,3 +479,48 @@ def call():
     for u, v in zip(ret_np, ret_from_np):
         assert u.dtype == v.dtype
         assert u.shape == v.shape
+
+
+@handle_frontend_test(
+    fn_tree="torch.randint_like",
+    dtype=helpers.get_dtypes("signed_integer", full=False),
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("signed_integer"),
+        min_num_dims=1,
+        max_num_dims=10,
+        min_dim_size=1,
+        max_dim_size=10,
+    ),
+    low=helpers.ints(min_value=0, max_value=10),
+    high=helpers.ints(min_value=11, max_value=20),
+)
+def test_torch_randint_like(
+    dtype_and_x, low, high, *, dtype, frontend, fn_tree, test_flags, backend_fw
+):
+    input_dtype, input = dtype_and_x
+
+    def call():
+        return helpers.test_frontend_function(
+            input_dtypes=input_dtype,
+            backend_to_test=backend_fw,
+            frontend=frontend,
+            test_values=False,
+            fn_tree=fn_tree,
+            test_flags=test_flags,
+            input=input[0],
+            low=low,
+            high=high,
+            dtype=dtype[0],
+        )
+
+    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
Repository: ivy-llc/ivy

Issue:
bmm



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
@@ -1507,6 +1507,9 @@ def baddbmm(self, batch1, batch2, *, beta=1, alpha=1):
             self, batch1=batch1, batch2=batch2, beta=beta, alpha=alpha
         )
 
+    def bmm(self, mat2):
+        return torch_frontend.bmm(self, mat2=mat2)
+
     @with_unsupported_dtypes({"2.0.1 and below": ("float16",)}, "torch")
     def floor_(self):
         self.ivy_array = self.floor().ivy_array


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
@@ -9835,6 +9835,36 @@ def test_torch_baddbmm(
     )
 
 
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="torch.tensor",
+    method_name="bmm",
+    dtype_and_matrices=_get_dtype_and_3dbatch_matrices(with_input=True, input_3d=True),
+)
+def test_torch_instance_bmm(
+    dtype_and_matrices,
+    backend_fw,
+    frontend,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    on_device,
+):
+    input_dtype, _, x, mat2 = dtype_and_matrices
+    helpers.test_frontend_method(
+        init_input_dtypes=input_dtype,
+        init_all_as_kwargs_np={"data": x},
+        method_input_dtypes=input_dtype,
+        method_all_as_kwargs_np={"mat2": mat2},
+        frontend=frontend,
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        on_device=on_device,
+        backend_to_test=backend_fw,
+    )
+
+
 @handle_frontend_method(
     class_tree=CLASS_TREE,
     init_tree="torch.tensor",
Repository: ivy-llc/ivy

Issue:
lgamma



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
@@ -209,6 +209,12 @@ def neg(x, name=None):
     return ivy.negative(x)
 
 
+@with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def lgamma(x, name=None):
+    return ivy.lgamma(x)
+
+
 @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
 @to_ivy_arrays_and_back
 def exp(x, name=None):


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
@@ -925,6 +925,36 @@ def test_paddle_neg(
     )
 
 
+# lgamma
+@handle_frontend_test(
+    fn_tree="paddle.tensor.math.lgamma",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        safety_factor_scale="log",
+    ),
+)
+def test_paddle_lgamma(
+    *,
+    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,
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        atol=1E-4,
+        x=x[0],
+    )
+
+
 # exp
 @handle_frontend_test(
     fn_tree="paddle.exp",
Repository: ivy-llc/ivy

Issue:
 randint_like



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/random.py b/ivy/functional/frontends/paddle/tensor/random.py
--- a/ivy/functional/frontends/paddle/tensor/random.py
+++ b/ivy/functional/frontends/paddle/tensor/random.py
@@ -1,7 +1,7 @@
 # global
 import ivy
 from ivy.func_wrapper import with_supported_dtypes
-from ivy.func_wrapper import with_supported_device_and_dtypes
+from ivy.func_wrapper import with_supported_device_and_dtypes, with_unsupported_dtypes
 from ivy.functional.frontends.paddle.func_wrapper import (
     to_ivy_arrays_and_back,
 )
@@ -91,3 +91,19 @@ def uniform_(x, min=-1.0, max=1.0, seed=0, name=None):
 @to_ivy_arrays_and_back
 def standard_normal(shape, dtype=None, name=None):
     return ivy.random_normal(mean=0, std=1, shape=shape, dtype=dtype)
+
+
+@with_unsupported_dtypes(
+    {"2.5.0 and below": ("int16", "float16", "bfloat16", "uint8")},
+    "paddle",
+)
+@to_ivy_arrays_and_back
+def randint_like(x, low=0, high=None, dtype=None, name=None):
+    if high == None:
+        high = low
+        low = 0
+        if high <= 0:
+            raise ivy.exceptions.IvyError(
+                "If high is None, low must be greater than 0, but received low = 0."
+            )
+    return ivy.randint(low, high, shape=x.shape, dtype=dtype, seed=None)
\ No newline at end of file


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_random.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_random.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_random.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_random.py
@@ -233,3 +233,42 @@ def test_paddle_standard_normal(
         shape=shape,
         dtype=dtype[0],
     )
+
+
+@handle_frontend_test(
+    fn_tree="paddle.randint_like",
+    input_dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        shape=helpers.get_shape(
+        allow_none=False, min_num_dims=2, max_num_dims=7, min_dim_size=2
+        ),
+    ),
+    low=st.integers(min_value=0, max_value=10),
+    high=st.integers(min_value=11, max_value=20),
+    dtype=helpers.get_dtypes("integer"),
+)
+def test_paddle_randint_like(
+    input_dtype_and_x,
+    low,
+    high,
+    dtype,
+    frontend,
+    backend_fw,
+    test_flags,
+    fn_tree,
+    on_device,
+):
+    input_dtype, x = input_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=False,
+        x=x[0],
+        low=low,
+        high=high,
+        dtype=dtype[0]
+    )
\ No newline at end of file
Repository: ivy-llc/ivy

Issue:
orthogonal 
Subtask of #8513


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
@@ -29,6 +29,26 @@ def normal(key, shape=(), dtype=None):
     return ivy.random_normal(shape=shape, dtype=dtype, seed=ivy.to_scalar(key[1]))
 
 
+@handle_jax_dtype
+@to_ivy_arrays_and_back
+def orthogonal(key, n, shape=(), dtype=None):
+    flat_shape = (n, n)
+    if shape:
+        flat_shape = shape + flat_shape
+
+    # Generate a random matrix with the given shape and dtype
+    random_matrix = ivy.random_uniform(key, shape=flat_shape, dtype=dtype)
+
+    # Compute the QR decomposition of the random matrix
+    q, _ = ivy.linalg.qr(random_matrix)
+
+    # Reshape the resulting orthogonal matrix to the desired shape
+    if shape:
+        q = ivy.reshape(q, shape + (n, n))
+
+    return q
+
+
 def _get_seed(key):
     key1, key2 = int(key[0]), int(key[1])
     return ivy.to_scalar(int("".join(map(str, [key1, key2]))))


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
@@ -80,6 +80,66 @@ def call():
         assert u.shape == v.shape
 
 
+@pytest.mark.xfail
+@handle_frontend_test(
+    fn_tree="jax.random.orthogonal",
+    dtype_key=helpers.dtype_and_values(
+        available_dtypes=["float32", "float64"],
+        min_value=0,
+        max_value=2000,
+        min_num_dims=1,
+        max_num_dims=3,
+        min_dim_size=2,
+        max_dim_size=5,
+    ),
+    n=helpers.get_shape(),
+    shape=helpers.get_shape(),
+    dtype=helpers.get_dtypes("float", full=False),
+)
+def test_jax_orthogonal(
+    *,
+    dtype_key,
+    n,
+    shape,
+    dtype,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    input_dtype, key = dtype_key
+
+    def call():
+        return helpers.test_frontend_function(
+            input_dtypes=input_dtype,
+            frontend=frontend,
+            test_flags=test_flags,
+            backend_to_test=backend_fw,
+            fn_tree=fn_tree,
+            on_device=on_device,
+            test_values=False,
+            key=key[0],
+            n=n,
+            shape=shape,
+            dtype=dtype[0],
+        )
+
+    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
+        # Check if the output matrices are orthogonal
+        assert ivy.allclose(ivy.eye(n), ivy.matmul(u.T, u))
+
+
 @pytest.mark.xfail
 @handle_frontend_test(
     fn_tree="jax.random.normal",
Repository: ivy-llc/ivy

Issue:
ifftn



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py
--- a/ivy/functional/frontends/scipy/fft/fft.py
+++ b/ivy/functional/frontends/scipy/fft/fft.py
@@ -33,3 +33,10 @@ def idct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize
 @to_ivy_arrays_and_back
 def fft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False):
     return ivy.fft2(x, s=s, dim=axes, norm=norm)
+
+
+@to_ivy_arrays_and_back
+def ifftn(
+    x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None
+):
+    return ivy.ifftn(x, s=s, dim=axes, norm=norm)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_scipy/test_fft/test_fft.py b/ivy_tests/test_ivy/test_frontends/test_scipy/test_fft/test_fft.py
--- a/ivy_tests/test_ivy/test_frontends/test_scipy/test_fft/test_fft.py
+++ b/ivy_tests/test_ivy/test_frontends/test_scipy/test_fft/test_fft.py
@@ -9,6 +9,7 @@
 
 # ### Helpers ###
 
+
 # @st.composite
 # def x_and_fft(draw, dtypes):
 #     min_fft_points = 2
@@ -127,8 +128,16 @@
 #     return dtype, x, s, dim, norm
 
 
+# @st.composite
+# def x_and_ifftn(draw):
+#     x_and_ifftn = draw(x_and_fft2())
+#     workers = draw(st.integers(1, 4))
+#     return x_and_ifftn + (workers,)
+
+
 # ### Tests ###
 
+
 # # fft
 # @handle_frontend_test(
 #     fn_tree="scipy.fft.fft",
@@ -268,3 +277,31 @@
 #         axes=ax,
 #         norm=norm,
 #     )
+
+
+# # ifftn
+# @handle_frontend_test(
+#     fn_tree="scipy.fft.ifftn",
+#     d_x_d_s_n_workers=x_and_ifftn(),
+#     test_with_out=st.just(False),
+# )
+# def test_scipy_ifftn(
+#     d_x_d_s_n_workers,
+#     frontend,
+#     test_flags,
+#     fn_tree,
+#     on_device,
+# ):
+#     dtype, x, s, ax, norm, workers = d_x_d_s_n_workers
+#     helpers.test_frontend_function(
+#         input_dtypes=dtype,
+#         frontend=frontend,
+#         test_flags=test_flags,
+#         fn_tree=fn_tree,
+#         on_device=on_device,
+#         x=x[0],
+#         s=s,
+#         axes=ax,
+#         norm=norm,
+#         workers=workers,
+#     )
Repository: ivy-llc/ivy

Issue:
rfftn



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py
--- a/ivy/functional/frontends/scipy/fft/fft.py
+++ b/ivy/functional/frontends/scipy/fft/fft.py
@@ -40,3 +40,10 @@ def ifftn(
     x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None
 ):
     return ivy.ifftn(x, s=s, dim=axes, norm=norm)
+
+
+@to_ivy_arrays_and_back
+def rfftn(
+    x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None
+):
+    return ivy.rfftn(x, s=s, dim=axes, norm=norm)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_scipy/test_fft/test_fft.py b/ivy_tests/test_ivy/test_frontends/test_scipy/test_fft/test_fft.py
--- a/ivy_tests/test_ivy/test_frontends/test_scipy/test_fft/test_fft.py
+++ b/ivy_tests/test_ivy/test_frontends/test_scipy/test_fft/test_fft.py
@@ -305,3 +305,31 @@
 #         norm=norm,
 #         workers=workers,
 #     )
+
+
+# # rfftn
+# @handle_frontend_test(
+#     fn_tree="scipy.fft.rfftn",
+#     d_x_d_s_n_workers=x_and_ifftn(),
+#     test_with_out=st.just(False),
+# )
+# def test_scipy_rfftn(
+#     d_x_d_s_n_workers,
+#     frontend,
+#     test_flags,
+#     fn_tree,
+#     on_device,
+# ):
+#     dtype, x, s, ax, norm, workers = d_x_d_s_n_workers
+#     helpers.test_frontend_function(
+#         input_dtypes=dtype,
+#         frontend=frontend,
+#         test_flags=test_flags,
+#         fn_tree=fn_tree,
+#         on_device=on_device,
+#         x=x[0],
+#         s=s,
+#         axes=ax,
+#         norm=norm,
+#         workers=workers,
+#     )
Repository: ivy-llc/ivy

Issue:
softmax_



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -231,3 +231,11 @@ def log_sigmoid(x, name=None):
 
 def silu(x, name=None):
     return ivy.silu(x)
+
+
+@with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def softmax_(x, axis=-1, dtype=None, name=None):
+    ret = ivy.softmax(x, axis=axis)
+    ivy.inplace_update(x, ret)
+    return x


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_nn/test_functional/test_activation.py
@@ -670,3 +670,39 @@ def test_paddle_softplus(
         beta=beta,
         threshold=threshold,
     )
+
+
+# softmax_
+@handle_frontend_test(
+    fn_tree="paddle.nn.functional.softmax_",
+    dtype_x_and_axis=helpers.dtype_values_axis(
+        available_dtypes=helpers.get_dtypes("float"),
+        min_num_dims=1,
+        max_axes_size=1,
+        force_int_axis=True,
+        valid_axis=True,
+        min_value=-30.0,
+        max_value=30.0,
+    ),
+    dtypes=helpers.get_dtypes("float", none=False, full=False),
+)
+def test_paddle_softmax_(
+    *,
+    dtype_x_and_axis,
+    dtypes,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+):
+    input_dtype, x, axis = dtype_x_and_axis
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        axis=axis,
+        dtype=ivy.as_ivy_dtype(dtypes[0]),
+    )
Repository: ivy-llc/ivy

Issue:
masked_select



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/search.py b/ivy/functional/frontends/paddle/tensor/search.py
--- a/ivy/functional/frontends/paddle/tensor/search.py
+++ b/ivy/functional/frontends/paddle/tensor/search.py
@@ -75,5 +75,13 @@ def searchsorted(sorted_sequence, values, out_int32=False, right=False, name=Non
     "paddle",
 )
 @to_ivy_arrays_and_back
+def masked_select(x, mask, name=None):
+    return ivy.flatten(x[mask])
+
+
+@with_supported_dtypes(
+    {"2.5.1 and below": ("float32", "float64", "int32", "int64")},
+    "paddle",
+)
 def topk(x, k, axis=None, largest=True, sorted=True, name=None):
     return ivy.top_k(x, k, axis=axis, largest=largest, sorted=sorted)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_search.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_search.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_search.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_search.py
@@ -208,6 +208,53 @@ def test_paddle_searchsorted(
     )
 
 
+# masked_select
+@st.composite
+def _dtypes_input_mask(draw):
+    _shape = draw(helpers.get_shape(min_num_dims=1, min_dim_size=1))
+    _mask = draw(helpers.array_values(dtype="bool", shape=_shape))
+    _dtype, _x = draw(
+        helpers.dtype_and_values(
+            available_dtypes=helpers.get_dtypes("valid"),
+            num_arrays=1,
+            shape=_shape,
+        )
+    )
+
+    return _dtype, _x, _mask
+
+
+@handle_frontend_test(
+    fn_tree="paddle.masked_select",
+    dtype_input_mask=_dtypes_input_mask(),
+)
+def test_paddle_masked_select(
+    *,
+    dtype_input_mask,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    (
+        input_dtype,
+        x,
+        mask,
+    ) = dtype_input_mask
+
+    helpers.test_frontend_function(
+        input_dtypes=input_dtype + ["bool"],
+        backend_to_test=backend_fw,
+        frontend=frontend,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+        on_device=on_device,
+        x=x[0],
+        mask=mask,
+    )
+
+
 @handle_frontend_test(
     fn_tree="paddle.topk",
     dtype_x_and_axis=helpers.dtype_values_axis(