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

Issue:
gumble_softmax
add mindspore gumble_softmax

- [gumble_softmax] #21042


Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/mindspore/ops/function/nn_func.py b/ivy/functional/frontends/mindspore/ops/function/nn_func.py
--- a/ivy/functional/frontends/mindspore/ops/function/nn_func.py
+++ b/ivy/functional/frontends/mindspore/ops/function/nn_func.py
@@ -238,3 +238,23 @@ def fast_gelu(input_x):
     return (input_x / (1 + ivy.exp(-1.702 * ivy.abs(input_x)))) * ivy.exp(
         0.851 * (input_x - ivy.abs(input_x))
     )
+
+
+@with_supported_dtypes({"2.0.0 and below": ("float16", "float32")}, "mindspore")
+@to_ivy_arrays_and_back
+def gumbel_softmax(logits, tau=1, hard=False, dim=-1):
+    gumbels = -ivy.empty_like(logits).exponential().log()
+    gumbels = (logits + gumbels) / tau
+    y_soft = ivy.softmax(gumbels, axis=dim)
+
+    if hard:
+        indices = y_soft.max(axis=dim, keepdims=True)[1]
+        y_hard = ivy.zeros_like(logits)
+        updates = ivy.ones_like(indices)
+        y_hard = ivy.scatter_nd(indices, updates, reduction="replace", out=y_hard)
+
+        ret = y_hard - y_soft.stop_gradient(preserve_type=True) + y_soft
+    else:
+        ret = y_soft
+
+    return ret


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_mindspore/test_ops/test_function/test_mindspore_nn_func.py b/ivy_tests/test_ivy/test_frontends/test_mindspore/test_ops/test_function/test_mindspore_nn_func.py
--- a/ivy_tests/test_ivy/test_frontends/test_mindspore/test_ops/test_function/test_mindspore_nn_func.py
+++ b/ivy_tests/test_ivy/test_frontends/test_mindspore/test_ops/test_function/test_mindspore_nn_func.py
@@ -425,6 +425,46 @@
 #     )
 
 
+# gumbel_softmax
+# @handle_frontend_test(
+#     fn_tree="mindspore.ops.function.nn_func.gumbel_softmax",
+#     dtype_and_x=helpers.dtype_and_values(
+#         available_dtypes=helpers.get_dtypes("valid"),
+#     ),
+#     tau=st.floats(min_value=0),
+#     hard=st.booleans(),
+#     dim=st.integers(),
+#     test_with_out=st.just(False),
+#     test_inplace=st.booleans(),
+# )
+# def test_torch_gumbel_softmax(
+#     *,
+#     dtype_and_x,
+#     tau,
+#     hard,
+#     dim,
+#     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,
+#         test_values=False,
+#         logits=x[0],
+#         tau=tau,
+#         hard=hard,
+#         dim=dim,
+#     )
+
+
 # FastGelu
 # @handle_frontend_test(
 #     fn_tree="mindspore.ops.function.nn_func.fast_gelu",
Repository: ivy-llc/ivy

Issue:
hamming_window



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/spectral_ops.py b/ivy/functional/frontends/torch/spectral_ops.py
--- a/ivy/functional/frontends/torch/spectral_ops.py
+++ b/ivy/functional/frontends/torch/spectral_ops.py
@@ -1,6 +1,6 @@
 import ivy
+from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
 from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
-from ivy.func_wrapper import with_supported_dtypes
 
 
 @to_ivy_arrays_and_back
@@ -59,3 +59,15 @@ def kaiser_window(
     requires_grad=False
 ):
     return ivy.kaiser_window(window_length, periodic=periodic, beta=beta, dtype=dtype)
+
+
+@to_ivy_arrays_and_back
+@with_unsupported_dtypes({"1.11.0 and below": ("float16",)}, "torch")
+def hamming_window(
+    window_length,
+    periodic=True,
+    alpha=0.54,
+    beta=0.46,
+    return ivy.hamming_window(
+        window_length, periodic=periodic, alpha=alpha, beta=beta, dtype=dtype
+    )


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_spectral_ops.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_spectral_ops.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_spectral_ops.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_spectral_ops.py
@@ -66,6 +66,56 @@ def test_torch_blackman_window(
     )
 
 
+# hamming_window
+@handle_frontend_test(
+    fn_tree="torch.hamming_window",
+    dtype_and_window_length=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("integer"),
+        max_num_dims=0,
+        min_value=1,
+        max_value=20,
+    ),
+    periodic=st.booleans(),
+    dtype_and_coefficients=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+        max_num_dims=0,
+        num_arrays=2,
+        min_value=0,
+        max_value=5,
+    ),
+    dtype=helpers.get_dtypes("float"),
+    test_with_out=st.just(False),
+)
+def test_torch_hamming_window(
+    dtype_and_window_length,
+    periodic,
+    dtype_and_coefficients,
+    *,
+    dtype,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    window_length_dtype, window_length = dtype_and_window_length
+    coefficients_dtypes, coefficients = dtype_and_coefficients
+
+    helpers.test_frontend_function(
+        input_dtypes=window_length_dtype + coefficients_dtypes,
+        window_length=int(window_length[0]),
+        periodic=periodic,
+        alpha=float(coefficients[0]),
+        beta=float(coefficients[1]),
+        dtype=dtype[0],
+        fn_tree=fn_tree,
+        frontend=frontend,
+        test_flags=test_flags,
+        backend_to_test=backend_fw,
+        rtol=1e-1,
+        atol=1e-1,
+    )
+
+
 @handle_frontend_test(
     window_length=helpers.ints(min_value=1, max_value=100),
     dtype=helpers.get_dtypes("float", full=False),
Repository: ivy-llc/ivy

Issue:
no_op



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
@@ -468,6 +468,9 @@ def slice(input_, begin, size, name=None):
 def linspace(start, stop, num, name=None, axis=0):
     return ivy.linspace(start, stop, num, axis=axis)
 
+@to_ivy_arrays_and_back
+def no_op(name=None):
+    return
 
 @with_unsupported_dtypes({"2.13.0 and below": ("unsigned", "integer")}, "tensorflow")
 @to_ivy_arrays_and_back


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
@@ -1555,6 +1555,29 @@ def test_tensorflow_linspace(
         on_device=on_device,
     )
 
+#no_op
+@handle_frontend_test(
+    fn_tree="tensorflow.no_op",
+    dtype=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+    ),
+    test_with_out=st.just(False),
+)
+def test_tensorflow_no_op(
+    *,
+    dtype,
+    frontend,
+    backend_fw,
+    test_flags,
+    fn_tree,
+):
+    helpers.test_frontend_function(
+        input_dtypes=dtype,
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        test_flags=test_flags,
+        fn_tree=fn_tree,
+    )
 
 # realdiv
 @handle_frontend_test(
Repository: ivy-llc/ivy

Issue:
triu_indices
Working on (#8431 -> #18033)


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
This issue is being closed. As this issue has been stalled with no activity for more than 7 days.
working on it.

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/creation.py b/ivy/functional/frontends/paddle/tensor/creation.py
--- a/ivy/functional/frontends/paddle/tensor/creation.py
+++ b/ivy/functional/frontends/paddle/tensor/creation.py
@@ -180,6 +180,16 @@ def logspace(start, stop, num, base=10.0, dtype=None, name=None):
     return ivy.logspace(start, stop, num=num, base=base, dtype=dtype)
 
 
+@with_supported_dtypes({"2.5.1 and below": ("int32", "int64")}, "paddle")
+@to_ivy_arrays_and_back
+def triu_indices(row, col=None, offset=0, dtype="int64"):
+    arr = ivy.triu_indices(row, col, offset)
+    if not ivy.to_scalar(ivy.shape(arr[0], as_array=True)):
+        return arr
+    arr = ivy.astype(arr, dtype)
+    return arr
+
+
 @with_supported_dtypes(
     {"2.5.1 and below": ("float32", "float64")},
     "paddle",


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
@@ -665,6 +665,41 @@ def test_paddle_assign(
     )
 
 
+# triu_indices
+@handle_frontend_test(
+    fn_tree="paddle.triu_indices",
+    dtype=helpers.get_dtypes("valid", full=False),
+    row=st.integers(min_value=1, max_value=5),
+    col=st.integers(min_value=1, max_value=5),
+    offset=st.integers(min_value=-4, max_value=4),
+    test_with_out=st.just(False),
+)
+def test_paddle_triu_indices(
+    row,
+    col,
+    offset,
+    dtype,
+    test_flags,
+    backend_fw,
+    frontend,
+    fn_tree,
+    on_device,
+):
+    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,
+        test_values=False,
+        row=row,
+        col=col,
+        offset=offset,
+        dtype=dtype[0],
+    )
+
+
 # complex
 @handle_frontend_test(
     fn_tree="paddle.complex",
Repository: ivy-llc/ivy

Issue:
sinc



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
@@ -1747,6 +1747,18 @@ def quantile(self, q, dim=None, keepdim=False, *, interpolation="linear", out=No
             self, q, axis=dim, keepdims=keepdim, interpolation=interpolation, out=out
         )
 
+    @with_unsupported_dtypes(
+        {
+            "2.0.1 and below": (
+                "float16",
+                "bfloat16",
+            )
+        },
+        "torch",
+    )
+    def sinc(self):
+        return torch_frontend.sinc(self)
+
 
 class Size(tuple):
     def __new__(cls, iterable=()):


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
@@ -11892,3 +11892,38 @@ def test_torch_tensor_quantile(
         method_flags=method_flags,
         on_device=on_device,
     )
+
+
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="torch.tensor",
+    method_name="sinc",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+    ),
+)
+def test_torch_instance_sinc(
+    *,
+    dtype_and_x,
+    frontend,
+    backend_fw,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    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,
+        method_all_as_kwargs_np={},
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        on_device=on_device,
+    )
Repository: ivy-llc/ivy

Issue:
complex



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/tensor/creation.py b/ivy/functional/frontends/paddle/tensor/creation.py
--- a/ivy/functional/frontends/paddle/tensor/creation.py
+++ b/ivy/functional/frontends/paddle/tensor/creation.py
@@ -178,3 +178,19 @@ def diag(x, offset=0, padding_value=0, name=None):
 @to_ivy_arrays_and_back
 def logspace(start, stop, num, base=10.0, dtype=None, name=None):
     return ivy.logspace(start, stop, num=num, base=base, dtype=dtype)
+
+
+@with_supported_dtypes(
+    {"2.5.1 and below": ("float32", "float64")},
+    "paddle",
+)
+@to_ivy_arrays_and_back
+def complex(real, imag, name=None):
+    assert real.dtype == imag.dtype, (
+        "(InvalidArgument) The type of data we are trying to retrieve does not match"
+        " the type of data currently contained in the container."
+    )
+    complex_dtype = "complex64" if real.dtype == "float32" else "complex128"
+    imag_cmplx = ivy.astype(imag, complex_dtype) * 1j
+    complex_array = real + imag_cmplx
+    return complex_array


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_creation.py
@@ -661,3 +661,31 @@ def test_paddle_assign(
         x=x[0],
         output=x[1],
     )
+
+
+# complex
+@handle_frontend_test(
+    fn_tree="paddle.complex",
+    dtype_and_arrays=helpers.dtype_and_values(
+        available_dtypes=["float32", "float64"], shared_dtype=True, num_arrays=2
+    ),
+)
+def test_paddle_complex(
+    dtype_and_arrays,
+    test_flags,
+    backend_fw,
+    frontend,
+    fn_tree,
+    on_device,
+):
+    input_dtype, (real, imag) = dtype_and_arrays
+    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,
+        real=real,
+        imag=imag,
+    )
Repository: ivy-llc/ivy

Issue:
double



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
@@ -303,6 +303,9 @@ def float(self, memory_format=None):
         self.ivy_array = ivy.astype(self.ivy_array, ivy.float32, copy=False)
         return self
 
+    def double(self):
+        return self.to(torch_frontend.float64)
+
     @with_unsupported_dtypes({"2.0.1 and below": ("float16",)}, "torch")
     def asinh(self):
         return torch_frontend.asinh(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
@@ -1419,6 +1419,40 @@ def test_torch_float(
     )
 
 
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="torch.tensor",
+    method_name="double",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+)
+def test_torch_instance_double(
+    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,
+        method_all_as_kwargs_np={},
+        frontend_method_data=frontend_method_data,
+        init_flags=init_flags,
+        method_flags=method_flags,
+        frontend=frontend,
+        backend_to_test=backend_fw,
+        on_device=on_device,
+    )
+
+
 # asinh
 @handle_frontend_method(
     class_tree=CLASS_TREE,
Repository: ivy-llc/ivy

Issue:
pareto



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
@@ -201,6 +201,14 @@ def logistic(loc=0.0, scale=1.0, size=None):
 
 @to_ivy_arrays_and_back
 @from_zero_dim_arrays_to_scalar
+def pareto(a, size=None):
+    if a < 0:
+        return 0
+    u = ivy.random_uniform(low=0.0, high=0.0, shape=size, dtype="float64")
+    return ivy.pow(1 / (1 - u), 1 / a)
+  
+@to_ivy_arrays_and_back
+@from_zero_dim_arrays_to_scalar 
 def triangular(left, mode, right, size=None):
     if left > mode or mode > right or left == right:
         raise ivy.utils.exceptions.IvyValueError(


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
@@ -834,6 +834,44 @@ def test_numpy_logistic(
     )
 
 
+#pareto
+@handle_frontend_test(
+    fn_tree="numpy.random.pareto",
+    input_dtypes=helpers.get_dtypes("float", index=2),
+    a=st.floats(
+        allow_nan=False,
+        allow_infinity=False,
+        width=32,
+        min_value=1,
+        max_value=1000,
+        exclude_min=True,
+    ),
+    size=helpers.get_shape(allow_none=True),
+    test_with_out=st.just(False),
+)
+def test_numpy_pareto(
+    input_dtypes,
+    frontend,
+    test_flags,
+    backend_fw,
+    fn_tree,
+    on_device,
+    a,
+    size,
+):
+    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=False,
+        a=a,
+        size=size,
+    )
+
+   
 @handle_frontend_test(
     fn_tree="numpy.random.triangular",
     input_dtypes=helpers.get_dtypes("float"),
@@ -886,4 +924,4 @@ def test_numpy_triangular(
         mode=mode,
         right=right,
         size=size,
-    )
+    )
\ No newline at end of file
Repository: ivy-llc/ivy

Issue:
to_tensor



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/paddle/vision/transforms.py b/ivy/functional/frontends/paddle/vision/transforms.py
--- a/ivy/functional/frontends/paddle/vision/transforms.py
+++ b/ivy/functional/frontends/paddle/vision/transforms.py
@@ -1 +1,15 @@
-# global
+import ivy
+from ivy.func_wrapper import with_supported_dtypes
+from ..tensor.tensor import Tensor
+from ivy.functional.frontends.paddle.func_wrapper import (
+    to_ivy_arrays_and_back,
+)
+
+
+@with_supported_dtypes(
+    {"2.5.1 and below": ("float32", "float64", "int32", "int64")}, "paddle"
+)
+@to_ivy_arrays_and_back
+def to_tensor(pic, data_format="CHW"):
+    array = ivy.array(pic)
+    return Tensor(array)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_vision/test_transforms.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_vision/test_transforms.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_vision/test_transforms.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_vision/test_transforms.py
@@ -1,3 +1,31 @@
 # global
 
 # local
+import ivy_tests.test_ivy.helpers as helpers
+from ivy_tests.test_ivy.helpers import handle_frontend_test
+
+
+# to_tensor
+@handle_frontend_test(
+    fn_tree="paddle.to_tensor",
+    dtype_and_x=helpers.dtype_and_values(available_dtypes=helpers.get_dtypes("valid")),
+)
+def test_paddle_to_tensor(
+    *,
+    dtype_and_x,
+    on_device,
+    fn_tree,
+    frontend,
+    test_flags,
+    backend_fw,
+):
+    input_dtype, input = 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,
+        pic=input[0],
+    )
Repository: ivy-llc/ivy

Issue:
lgamma



Discussion:

Resolving patch:
diff --git a/ivy/functional/frontends/torch/pointwise_ops.py b/ivy/functional/frontends/torch/pointwise_ops.py
--- a/ivy/functional/frontends/torch/pointwise_ops.py
+++ b/ivy/functional/frontends/torch/pointwise_ops.py
@@ -563,3 +563,9 @@ def masked_fill(input, mask, value):
 @to_ivy_arrays_and_back
 def igamma(input, other, *, out=None):
     return ivy.igamma(input, x=other, out=out)
+
+
+@with_unsupported_dtypes({"2.0.1 and below": ("float16",)}, "torch")
+@to_ivy_arrays_and_back
+def lgamma(input, *, out=None):
+    return ivy.lgamma(input, out=out)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py b/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py
--- a/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py
+++ b/ivy_tests/test_ivy/test_frontends/test_torch/test_pointwise_ops.py
@@ -2832,3 +2832,30 @@ def test_torch_igamma(
         input=x[0],
         other=x[1],
     )
+
+
+@handle_frontend_test(
+    fn_tree="torch.lgamma",
+    dtype_and_input=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("float"),
+    ),
+)
+def test_torch_lgamma(
+    *,
+    dtype_and_input,
+    frontend,
+    test_flags,
+    fn_tree,
+    backend_fw,
+    on_device,
+):
+    input_dtype, input = dtype_and_input
+    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=input[0],
+    )
Repository: ivy-llc/ivy

Issue:
floor_divide



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
@@ -458,6 +458,13 @@ def square(x, name=None):
     return ivy.square(x)
 
 
+@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def floor_divide(x, y, name=None):
+    return ivy.floor_divide(x, y)
+
+
+@with_supported_dtypes({"2.5.0 and below": "bool"}, "paddle")
 @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
 @to_ivy_arrays_and_back
 def stanh(x, scale_a=0.67, scale_b=1.7159, 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
@@ -1949,6 +1949,42 @@ def test_paddle_sin(
     )
 
 
+# floor_divide
+@handle_frontend_test(
+    fn_tree="paddle.tensor.math.floor_divide",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+        min_value=-10,
+        max_value=10,
+        num_arrays=2,
+        allow_inf=False,
+        shared_dtype=True,
+    ),
+)
+def test_paddle_floor_divide(
+    *,
+    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,
+        fn_tree=fn_tree,
+        test_flags=test_flags,
+        on_device=on_device,
+        x=x[0],
+        y=x[1],
+        atol=1e-5,
+    )
+
+
+# diff
 # sinh
 @handle_frontend_test(
     fn_tree="paddle.sinh",