Repository: ivy-llc/ivy

Issue:
 logical_not
adding  logical_not in paddle.tensor.tesnor.Tensor form this todo 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
@@ -439,7 +439,6 @@ def max(self, axis=None, keepdim=False, name=None):
     def deg2rad(self, name=None):
         return ivy.deg2rad(self._ivy_array)
 
-
     @with_supported_dtypes(
         {"2.5.0 and below": ("float32", "float64", "int32", "int64", "bool")}, "paddle"
     )
@@ -478,3 +477,20 @@ def floor_divide(self, y, name=None):
     @with_unsupported_dtypes({"2.4.2 and below": ("int16", "float16")}, "paddle")
     def conj(self, name=None):
         return ivy.conj(self._ivy_array)
+
+    @with_supported_dtypes(
+        {
+            "2.5.0 and below": (
+                "bool",
+                "int8",
+                "int16",
+                "int32",
+                "int64",
+                "float32",
+                "float64",
+            )
+        },
+        "paddle",
+    )
+    def logical_not(self, out=None, name=None):
+        return ivy.logical_not(self.ivy_array)


Test patch:
diff --git a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
--- a/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
+++ b/ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_paddle_tensor.py
@@ -9,7 +9,7 @@
 import ivy_tests.test_ivy.helpers as helpers
 from ivy.functional.frontends.paddle import Tensor
 from ivy_tests.test_ivy.helpers import handle_frontend_method
-from ivy_tests.test_ivy.test_functional.test_experimental.test_core.test_manipulation import (
+from ivy_tests.test_ivy.test_functional.test_experimental.test_core.test_manipulation import (  # noqa E501
     _get_dtype_values_k_axes_for_rot90,
 )
 
@@ -1981,8 +1981,8 @@ def test_paddle_deg2rad(
         frontend=frontend,
         on_device=on_device,
     )
-    
-    
+
+
 # rot90
 @handle_frontend_method(
     class_tree=CLASS_TREE,
@@ -2295,3 +2295,36 @@ def test_paddle_isnan(
         frontend=frontend,
         on_device=on_device,
     )
+
+
+#  logical_not
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="paddle.to_tensor",
+    method_name="logical_not",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+)
+def test_paddle_logical_not(
+    dtype_and_x,
+    frontend_method_data,
+    init_flags,
+    method_flags,
+    frontend,
+    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,
+        on_device=on_device,
+    )