Repository: ivy-llc/ivy

Issue:
atanh



Discussion:
- [ ] #15908
Hey @sachelsout 

The implementation needed here is for the `paddle.Tensor` instance method https://github.com/unifyai/ivy/blob/a41d59ad0316039953f5e109390057ae1609da1e/ivy/functional/frontends/paddle/tensor/tensor.py#L10.
Feel free to open the PR😊
> Hey @sachelsout
> 
> The implementation needed here is for the `paddle.Tensor` instance method
> 
> https://github.com/unifyai/ivy/blob/a41d59ad0316039953f5e109390057ae1609da1e/ivy/functional/frontends/paddle/tensor/tensor.py#L10
> 
> .
> Feel free to open the PR😊

Hello @hirwa-nshuti , I'll complete the code for this issue and create a PR soon !! 😃 

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
@@ -1,7 +1,10 @@
 # local
 import ivy
 import ivy.functional.frontends.paddle as paddle_frontend
-from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
+from ivy.func_wrapper import (
+    with_supported_dtypes,
+    with_unsupported_dtypes,
+)
 from ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array
 
 
@@ -560,7 +563,6 @@ def logical_not(self, out=None, name=None):
     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
     def sign(self, name=None):
         return ivy.sign(self._ivy_array)
-        return paddle_frontend.Tensor(ivy.sign(self._ivy_array, np_variant=False))
 
     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
     def sgn(self, name=None):
@@ -576,6 +578,10 @@ def tolist(self):
     def min(self, axis=None, keepdim=False, name=None):
         return ivy.min(self._ivy_array, axis=axis, keepdims=keepdim)
 
+    @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
+    def atanh(self, name=None):
+        return ivy.atanh(self._ivy_array)
+
     @with_unsupported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
     def std(self, axis=None, unbiased=True, keepdim=False, name=None):
         return paddle_frontend.Tensor(


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
@@ -2758,3 +2758,36 @@ def test_paddle_instance_std(
         frontend=frontend,
         on_device=on_device,
     )
+
+
+# atanh
+@handle_frontend_method(
+    class_tree=CLASS_TREE,
+    init_tree="paddle.to_tensor",
+    method_name="atanh",
+    dtype_and_x=helpers.dtype_and_values(
+        available_dtypes=helpers.get_dtypes("valid"),
+    ),
+)
+def test_paddle_atanh(
+    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,
+    )
\ No newline at end of file