We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
angle


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ivy/functional/frontends/paddle/tensor/tensor.py`
Content:
```
1 # local
2 import ivy
3 import ivy.functional.frontends.paddle as paddle_frontend
4 from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
5 from ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array
6 
7 
8 class Tensor:
9     def __init__(self, array, dtype=None, place="cpu", stop_gradient=True):
10         self._ivy_array = (
11             ivy.array(array, dtype=dtype, device=place)
12             if not isinstance(array, ivy.Array)
13             else array
14         )
15         self._dtype = dtype
16         self._place = place
17         self._stop_gradient = stop_gradient
18 
19     def __repr__(self):
20         return (
21             str(self._ivy_array.__repr__())
22             .replace("ivy.array", "ivy.frontends.paddle.Tensor")
23             .replace("dev", "place")
24         )
25 
26     # Properties #
27     # ---------- #
28 
29     @property
30     def ivy_array(self):
31         return self._ivy_array
32 
33     @property
34     def place(self):
35         return self.ivy_array.device
36 
37     @property
38     def dtype(self):
39         return self._ivy_array.dtype
40 
41     @property
42     def shape(self):
43         return self._ivy_array.shape
44 
45     @property
46     def ndim(self):
47         return self.dim()
48 
49     # Setters #
50     # --------#
51 
52     @ivy_array.setter
53     def ivy_array(self, array):
54         self._ivy_array = (
55             ivy.array(array) if not isinstance(array, ivy.Array) else array
56         )
57 
58     # Special Methods #
59     # -------------------#
60 
61     def __getitem__(self, item):
62         ivy_args = ivy.nested_map([self, item], _to_ivy_array)
63         ret = ivy.get_item(*ivy_args)
64         return paddle_frontend.Tensor(ret)
65 
66     def __setitem__(self, item, value):
67         item, value = ivy.nested_map([item, value], _to_ivy_array)
68         self.ivy_array[item] = value
69 
70     def __iter__(self):
71         if self.ndim == 0:
72             raise TypeError("iteration over a 0-d tensor not supported")
73         for i in range(self.shape[0]):
74             yield self[i]
75 
76     # Instance Methods #
77     # ---------------- #
78 
79     def reshape(self, *args, shape=None):
80         if args and shape:
81             raise TypeError("reshape() got multiple values for argument 'shape'")
82         if shape is not None:
83             return paddle_frontend.reshape(self._ivy_array, shape)
84         if args:
85             if isinstance(args[0], (tuple, list)):
86                 shape = args[0]
87                 return paddle_frontend.reshape(self._ivy_array, shape)
88             else:
89                 return paddle_frontend.reshape(self._ivy_array, args)
90         return paddle_frontend.reshape(self._ivy_array)
91 
92     def dim(self):
93         return self.ivy_array.ndim
94 
95     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
96     def abs(self):
97         return paddle_frontend.abs(self)
98 
99     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
100     def ceil(self):
101         return paddle_frontend.ceil(self)
102 
103     @with_unsupported_dtypes({"2.5.0 and below": ("float16",)}, "paddle")
104     def asinh(self, name=None):
105         return ivy.asinh(self._ivy_array)
106 
107     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
108     def asin(self, name=None):
109         return ivy.asin(self._ivy_array)
110 
111     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
112     def cosh(self, name=None):
113         return ivy.cosh(self._ivy_array)
114 
115     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
116     def log(self, name=None):
117         return ivy.log(self._ivy_array)
118 
119     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
120     def sin(self, name=None):
121         return ivy.sin(self._ivy_array)
122 
123     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
124     def sinh(self, name=None):
125         return ivy.sinh(self._ivy_array)
126 
127     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
128     def argmax(self, axis=None, keepdim=False, dtype=None, name=None):
129         return ivy.argmax(self._ivy_array, axis=axis, keepdims=keepdim, dtype=dtype)
130 
131     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
132     def sqrt(self, name=None):
133         return ivy.sqrt(self._ivy_array)
134 
135     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
136     def cos(self, name=None):
137         return ivy.cos(self._ivy_array)
138 
139     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
140     def exp(self, name=None):
141         return ivy.exp(self._ivy_array)
142 
143     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
144     def erf(self, name=None):
145         return ivy.erf(self._ivy_array)
146 
147     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
148     def subtract(self, y, name=None):
149         y_ivy = _to_ivy_array(y)
150         return ivy.subtract(self._ivy_array, y_ivy)
151 
152     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
153     def log10(self, name=None):
154         return ivy.log10(self._ivy_array)
155 
156     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
157     def argsort(self, axis=-1, descending=False, name=None):
158         return ivy.argsort(self._ivy_array, axis=axis, descending=descending)
159 
160     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
161     def floor(self, name=None):
162         return ivy.floor(self._ivy_array)
163 
164     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
165     def tanh(self, name=None):
166         return ivy.tanh(self._ivy_array)
167 
168     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
169     def add_(self, name=None):
170         return ivy.add(self._ivy_array)
171 
172     @with_supported_dtypes(
173         {"2.5.0 and below": ("float16", "float32", "float64", "int32", "int64")},
174         "paddle",
175     )
176     def isinf(self, name=None):
177         return ivy.isinf(self._ivy_array)
178 
179     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
180     def square(self, name=None):
181         return ivy.square(self._ivy_array)
182 
183     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
184     def cholesky(self, upper=False, name=None):
185         return ivy.cholesky(self._ivy_array, upper=upper)
186 
187     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
188     def multiply(self, y, name=None):
189         return paddle_frontend.multiply(self, y)
190 
191     @with_supported_dtypes(
192         {"2.5.0 and below": ("float16", "float32", "float64", "int32", "int64")},
193         "paddle",
194     )
195     def isfinite(self, name=None):
196         return ivy.isfinite(self._ivy_array)
197 
198     def all(self, axis=None, keepdim=False, name=None):
199         return ivy.all(self.ivy_array, axis=axis, keepdims=keepdim)
200 
201     @with_supported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
202     def allclose(self, other, rtol=1e-05, atol=1e-08, equal_nan=False, name=None):
203         return ivy.allclose(
204             self._ivy_array, other, rtol=rtol, atol=atol, equal_nan=equal_nan
205         )
206 
207     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
208     def sort(self, axis=-1, descending=False, name=None):
209         return ivy.sort(self._ivy_array, axis=axis, descending=descending)
210 
211     @with_supported_dtypes(
212         {
213             "2.5.0 and below": (
214                 "bool",
215                 "int8",
216                 "int16",
217                 "int32",
218                 "int64",
219                 "float32",
220                 "float64",
221             )
222         },
223         "paddle",
224     )
225     def logical_or(self, y, out=None, name=None):
226         return paddle_frontend.logical_or(self, y, out=out)
227 
228     @with_supported_dtypes(
229         {"2.5.0 and below": ("bool", "uint8", "int8", "int16", "int32", "int64")},
230         "paddle",
231     )
232     def bitwise_xor(self, y, out=None, name=None):
233         return paddle_frontend.bitwise_xor(self, y)
234 
235     @with_supported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
236     def any(self, axis=None, keepdim=False, name=None):
237         return ivy.any(self._ivy_array, axis=axis, keepdims=keepdim)
238 
239     @with_supported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
240     def astype(self, dtype):
241         return ivy.astype(self._ivy_array, dtype=dtype)
242 
243     @with_supported_dtypes(
244         {
245             "2.5.0 and below": (
246                 "bool",
247                 "int8",
248                 "int16",
249                 "int32",
250                 "int64",
251                 "float32",
252                 "float64",
253             )
254         },
255         "paddle",
256     )
257     def logical_xor(self, y, out=None, name=None):
258         return paddle_frontend.logical_xor(self, y, out=out)
259 
260     @with_unsupported_dtypes(
261         {
262             "2.5.0 and below": (
263                 "bool",
264                 "uint8",
265                 "int8",
266                 "int16",
267                 "complex64",
268                 "complex128",
269             )
270         },
271         "paddle",
272     )
273     def greater_than(self, y, name=None):
274         return paddle_frontend.greater_than(self, y)
275 
276     @with_supported_dtypes({"2.5.0 and below": ("float32", "float64")}, "paddle")
277     def rsqrt(self, name=None):
278         return ivy.reciprocal(ivy.sqrt(self._ivy_array))
279 
280     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
281     def cumprod(self, dim=None, dtype=None, name=None):
282         return ivy.cumprod(self._ivy_array, axis=dim, dtype=dtype)
283 
284     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
285     def cumsum(self, axis=None, dtype=None, name=None):
286         return ivy.cumsum(self._ivy_array, axis=axis, dtype=dtype)
287
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

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
@@ -284,3 +284,10 @@
     @with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
     def cumsum(self, axis=None, dtype=None, name=None):
         return ivy.cumsum(self._ivy_array, axis=axis, dtype=dtype)
+
+    @with_supported_dtypes(
+        {"2.5.0 and below": ("complex64", "complex128", "float32", "float64")},
+        "paddle",
+    )
+    def angle(self, name=None):
+        return ivy.angle(self._ivy_array)

{"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py\n--- a/ivy/functional/frontends/paddle/tensor/tensor.py\n+++ b/ivy/functional/frontends/paddle/tensor/tensor.py\n@@ -284,3 +284,10 @@\n     @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n     def cumsum(self, axis=None, dtype=None, name=None):\r\n         return ivy.cumsum(self._ivy_array, axis=axis, dtype=dtype)\r\n+\r\n+    @with_supported_dtypes(\r\n+        {\"2.5.0 and below\": (\"complex64\", \"complex128\", \"float32\", \"float64\")},\r\n+        \"paddle\",\r\n+    )\r\n+    def angle(self, name=None):\r\n+        return ivy.angle(self._ivy_array)\n", "issue": "angle\n\n", "before_files": [{"content": "# local\r\nimport ivy\r\nimport ivy.functional.frontends.paddle as paddle_frontend\r\nfrom ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes\r\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\r\n\r\n\r\nclass Tensor:\r\n    def __init__(self, array, dtype=None, place=\"cpu\", stop_gradient=True):\r\n        self._ivy_array = (\r\n            ivy.array(array, dtype=dtype, device=place)\r\n            if not isinstance(array, ivy.Array)\r\n            else array\r\n        )\r\n        self._dtype = dtype\r\n        self._place = place\r\n        self._stop_gradient = stop_gradient\r\n\r\n    def __repr__(self):\r\n        return (\r\n            str(self._ivy_array.__repr__())\r\n            .replace(\"ivy.array\", \"ivy.frontends.paddle.Tensor\")\r\n            .replace(\"dev\", \"place\")\r\n        )\r\n\r\n    # Properties #\r\n    # ---------- #\r\n\r\n    @property\r\n    def ivy_array(self):\r\n        return self._ivy_array\r\n\r\n    @property\r\n    def place(self):\r\n        return self.ivy_array.device\r\n\r\n    @property\r\n    def dtype(self):\r\n        return self._ivy_array.dtype\r\n\r\n    @property\r\n    def shape(self):\r\n        return self._ivy_array.shape\r\n\r\n    @property\r\n    def ndim(self):\r\n        return self.dim()\r\n\r\n    # Setters #\r\n    # --------#\r\n\r\n    @ivy_array.setter\r\n    def ivy_array(self, array):\r\n        self._ivy_array = (\r\n            ivy.array(array) if not isinstance(array, ivy.Array) else array\r\n        )\r\n\r\n    # Special Methods #\r\n    # -------------------#\r\n\r\n    def __getitem__(self, item):\r\n        ivy_args = ivy.nested_map([self, item], _to_ivy_array)\r\n        ret = ivy.get_item(*ivy_args)\r\n        return paddle_frontend.Tensor(ret)\r\n\r\n    def __setitem__(self, item, value):\r\n        item, value = ivy.nested_map([item, value], _to_ivy_array)\r\n        self.ivy_array[item] = value\r\n\r\n    def __iter__(self):\r\n        if self.ndim == 0:\r\n            raise TypeError(\"iteration over a 0-d tensor not supported\")\r\n        for i in range(self.shape[0]):\r\n            yield self[i]\r\n\r\n    # Instance Methods #\r\n    # ---------------- #\r\n\r\n    def reshape(self, *args, shape=None):\r\n        if args and shape:\r\n            raise TypeError(\"reshape() got multiple values for argument 'shape'\")\r\n        if shape is not None:\r\n            return paddle_frontend.reshape(self._ivy_array, shape)\r\n        if args:\r\n            if isinstance(args[0], (tuple, list)):\r\n                shape = args[0]\r\n                return paddle_frontend.reshape(self._ivy_array, shape)\r\n            else:\r\n                return paddle_frontend.reshape(self._ivy_array, args)\r\n        return paddle_frontend.reshape(self._ivy_array)\r\n\r\n    def dim(self):\r\n        return self.ivy_array.ndim\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def abs(self):\r\n        return paddle_frontend.abs(self)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def ceil(self):\r\n        return paddle_frontend.ceil(self)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\",)}, \"paddle\")\r\n    def asinh(self, name=None):\r\n        return ivy.asinh(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def asin(self, name=None):\r\n        return ivy.asin(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def cosh(self, name=None):\r\n        return ivy.cosh(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def log(self, name=None):\r\n        return ivy.log(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def sin(self, name=None):\r\n        return ivy.sin(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def sinh(self, name=None):\r\n        return ivy.sinh(self._ivy_array)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def argmax(self, axis=None, keepdim=False, dtype=None, name=None):\r\n        return ivy.argmax(self._ivy_array, axis=axis, keepdims=keepdim, dtype=dtype)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def sqrt(self, name=None):\r\n        return ivy.sqrt(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def cos(self, name=None):\r\n        return ivy.cos(self._ivy_array)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def exp(self, name=None):\r\n        return ivy.exp(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def erf(self, name=None):\r\n        return ivy.erf(self._ivy_array)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def subtract(self, y, name=None):\r\n        y_ivy = _to_ivy_array(y)\r\n        return ivy.subtract(self._ivy_array, y_ivy)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def log10(self, name=None):\r\n        return ivy.log10(self._ivy_array)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def argsort(self, axis=-1, descending=False, name=None):\r\n        return ivy.argsort(self._ivy_array, axis=axis, descending=descending)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def floor(self, name=None):\r\n        return ivy.floor(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def tanh(self, name=None):\r\n        return ivy.tanh(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def add_(self, name=None):\r\n        return ivy.add(self._ivy_array)\r\n\r\n    @with_supported_dtypes(\r\n        {\"2.5.0 and below\": (\"float16\", \"float32\", \"float64\", \"int32\", \"int64\")},\r\n        \"paddle\",\r\n    )\r\n    def isinf(self, name=None):\r\n        return ivy.isinf(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def square(self, name=None):\r\n        return ivy.square(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def cholesky(self, upper=False, name=None):\r\n        return ivy.cholesky(self._ivy_array, upper=upper)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def multiply(self, y, name=None):\r\n        return paddle_frontend.multiply(self, y)\r\n\r\n    @with_supported_dtypes(\r\n        {\"2.5.0 and below\": (\"float16\", \"float32\", \"float64\", \"int32\", \"int64\")},\r\n        \"paddle\",\r\n    )\r\n    def isfinite(self, name=None):\r\n        return ivy.isfinite(self._ivy_array)\r\n\r\n    def all(self, axis=None, keepdim=False, name=None):\r\n        return ivy.all(self.ivy_array, axis=axis, keepdims=keepdim)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def allclose(self, other, rtol=1e-05, atol=1e-08, equal_nan=False, name=None):\r\n        return ivy.allclose(\r\n            self._ivy_array, other, rtol=rtol, atol=atol, equal_nan=equal_nan\r\n        )\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def sort(self, axis=-1, descending=False, name=None):\r\n        return ivy.sort(self._ivy_array, axis=axis, descending=descending)\r\n\r\n    @with_supported_dtypes(\r\n        {\r\n            \"2.5.0 and below\": (\r\n                \"bool\",\r\n                \"int8\",\r\n                \"int16\",\r\n                \"int32\",\r\n                \"int64\",\r\n                \"float32\",\r\n                \"float64\",\r\n            )\r\n        },\r\n        \"paddle\",\r\n    )\r\n    def logical_or(self, y, out=None, name=None):\r\n        return paddle_frontend.logical_or(self, y, out=out)\r\n\r\n    @with_supported_dtypes(\r\n        {\"2.5.0 and below\": (\"bool\", \"uint8\", \"int8\", \"int16\", \"int32\", \"int64\")},\r\n        \"paddle\",\r\n    )\r\n    def bitwise_xor(self, y, out=None, name=None):\r\n        return paddle_frontend.bitwise_xor(self, y)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def any(self, axis=None, keepdim=False, name=None):\r\n        return ivy.any(self._ivy_array, axis=axis, keepdims=keepdim)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def astype(self, dtype):\r\n        return ivy.astype(self._ivy_array, dtype=dtype)\r\n\r\n    @with_supported_dtypes(\r\n        {\r\n            \"2.5.0 and below\": (\r\n                \"bool\",\r\n                \"int8\",\r\n                \"int16\",\r\n                \"int32\",\r\n                \"int64\",\r\n                \"float32\",\r\n                \"float64\",\r\n            )\r\n        },\r\n        \"paddle\",\r\n    )\r\n    def logical_xor(self, y, out=None, name=None):\r\n        return paddle_frontend.logical_xor(self, y, out=out)\r\n\r\n    @with_unsupported_dtypes(\r\n        {\r\n            \"2.5.0 and below\": (\r\n                \"bool\",\r\n                \"uint8\",\r\n                \"int8\",\r\n                \"int16\",\r\n                \"complex64\",\r\n                \"complex128\",\r\n            )\r\n        },\r\n        \"paddle\",\r\n    )\r\n    def greater_than(self, y, name=None):\r\n        return paddle_frontend.greater_than(self, y)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def rsqrt(self, name=None):\r\n        return ivy.reciprocal(ivy.sqrt(self._ivy_array))\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def cumprod(self, dim=None, dtype=None, name=None):\r\n        return ivy.cumprod(self._ivy_array, axis=dim, dtype=dtype)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def cumsum(self, axis=None, dtype=None, name=None):\r\n        return ivy.cumsum(self._ivy_array, axis=axis, dtype=dtype)\r\n", "path": "ivy/functional/frontends/paddle/tensor/tensor.py"}], "after_files": [{"content": "# local\r\nimport ivy\r\nimport ivy.functional.frontends.paddle as paddle_frontend\r\nfrom ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes\r\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\r\n\r\n\r\nclass Tensor:\r\n    def __init__(self, array, dtype=None, place=\"cpu\", stop_gradient=True):\r\n        self._ivy_array = (\r\n            ivy.array(array, dtype=dtype, device=place)\r\n            if not isinstance(array, ivy.Array)\r\n            else array\r\n        )\r\n        self._dtype = dtype\r\n        self._place = place\r\n        self._stop_gradient = stop_gradient\r\n\r\n    def __repr__(self):\r\n        return (\r\n            str(self._ivy_array.__repr__())\r\n            .replace(\"ivy.array\", \"ivy.frontends.paddle.Tensor\")\r\n            .replace(\"dev\", \"place\")\r\n        )\r\n\r\n    # Properties #\r\n    # ---------- #\r\n\r\n    @property\r\n    def ivy_array(self):\r\n        return self._ivy_array\r\n\r\n    @property\r\n    def place(self):\r\n        return self.ivy_array.device\r\n\r\n    @property\r\n    def dtype(self):\r\n        return self._ivy_array.dtype\r\n\r\n    @property\r\n    def shape(self):\r\n        return self._ivy_array.shape\r\n\r\n    @property\r\n    def ndim(self):\r\n        return self.dim()\r\n\r\n    # Setters #\r\n    # --------#\r\n\r\n    @ivy_array.setter\r\n    def ivy_array(self, array):\r\n        self._ivy_array = (\r\n            ivy.array(array) if not isinstance(array, ivy.Array) else array\r\n        )\r\n\r\n    # Special Methods #\r\n    # -------------------#\r\n\r\n    def __getitem__(self, item):\r\n        ivy_args = ivy.nested_map([self, item], _to_ivy_array)\r\n        ret = ivy.get_item(*ivy_args)\r\n        return paddle_frontend.Tensor(ret)\r\n\r\n    def __setitem__(self, item, value):\r\n        item, value = ivy.nested_map([item, value], _to_ivy_array)\r\n        self.ivy_array[item] = value\r\n\r\n    def __iter__(self):\r\n        if self.ndim == 0:\r\n            raise TypeError(\"iteration over a 0-d tensor not supported\")\r\n        for i in range(self.shape[0]):\r\n            yield self[i]\r\n\r\n    # Instance Methods #\r\n    # ---------------- #\r\n\r\n    def reshape(self, *args, shape=None):\r\n        if args and shape:\r\n            raise TypeError(\"reshape() got multiple values for argument 'shape'\")\r\n        if shape is not None:\r\n            return paddle_frontend.reshape(self._ivy_array, shape)\r\n        if args:\r\n            if isinstance(args[0], (tuple, list)):\r\n                shape = args[0]\r\n                return paddle_frontend.reshape(self._ivy_array, shape)\r\n            else:\r\n                return paddle_frontend.reshape(self._ivy_array, args)\r\n        return paddle_frontend.reshape(self._ivy_array)\r\n\r\n    def dim(self):\r\n        return self.ivy_array.ndim\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def abs(self):\r\n        return paddle_frontend.abs(self)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def ceil(self):\r\n        return paddle_frontend.ceil(self)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\",)}, \"paddle\")\r\n    def asinh(self, name=None):\r\n        return ivy.asinh(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def asin(self, name=None):\r\n        return ivy.asin(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def cosh(self, name=None):\r\n        return ivy.cosh(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def log(self, name=None):\r\n        return ivy.log(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def sin(self, name=None):\r\n        return ivy.sin(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def sinh(self, name=None):\r\n        return ivy.sinh(self._ivy_array)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def argmax(self, axis=None, keepdim=False, dtype=None, name=None):\r\n        return ivy.argmax(self._ivy_array, axis=axis, keepdims=keepdim, dtype=dtype)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def sqrt(self, name=None):\r\n        return ivy.sqrt(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def cos(self, name=None):\r\n        return ivy.cos(self._ivy_array)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def exp(self, name=None):\r\n        return ivy.exp(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def erf(self, name=None):\r\n        return ivy.erf(self._ivy_array)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def subtract(self, y, name=None):\r\n        y_ivy = _to_ivy_array(y)\r\n        return ivy.subtract(self._ivy_array, y_ivy)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def log10(self, name=None):\r\n        return ivy.log10(self._ivy_array)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def argsort(self, axis=-1, descending=False, name=None):\r\n        return ivy.argsort(self._ivy_array, axis=axis, descending=descending)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def floor(self, name=None):\r\n        return ivy.floor(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def tanh(self, name=None):\r\n        return ivy.tanh(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def add_(self, name=None):\r\n        return ivy.add(self._ivy_array)\r\n\r\n    @with_supported_dtypes(\r\n        {\"2.5.0 and below\": (\"float16\", \"float32\", \"float64\", \"int32\", \"int64\")},\r\n        \"paddle\",\r\n    )\r\n    def isinf(self, name=None):\r\n        return ivy.isinf(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def square(self, name=None):\r\n        return ivy.square(self._ivy_array)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def cholesky(self, upper=False, name=None):\r\n        return ivy.cholesky(self._ivy_array, upper=upper)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def multiply(self, y, name=None):\r\n        return paddle_frontend.multiply(self, y)\r\n\r\n    @with_supported_dtypes(\r\n        {\"2.5.0 and below\": (\"float16\", \"float32\", \"float64\", \"int32\", \"int64\")},\r\n        \"paddle\",\r\n    )\r\n    def isfinite(self, name=None):\r\n        return ivy.isfinite(self._ivy_array)\r\n\r\n    def all(self, axis=None, keepdim=False, name=None):\r\n        return ivy.all(self.ivy_array, axis=axis, keepdims=keepdim)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def allclose(self, other, rtol=1e-05, atol=1e-08, equal_nan=False, name=None):\r\n        return ivy.allclose(\r\n            self._ivy_array, other, rtol=rtol, atol=atol, equal_nan=equal_nan\r\n        )\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def sort(self, axis=-1, descending=False, name=None):\r\n        return ivy.sort(self._ivy_array, axis=axis, descending=descending)\r\n\r\n    @with_supported_dtypes(\r\n        {\r\n            \"2.5.0 and below\": (\r\n                \"bool\",\r\n                \"int8\",\r\n                \"int16\",\r\n                \"int32\",\r\n                \"int64\",\r\n                \"float32\",\r\n                \"float64\",\r\n            )\r\n        },\r\n        \"paddle\",\r\n    )\r\n    def logical_or(self, y, out=None, name=None):\r\n        return paddle_frontend.logical_or(self, y, out=out)\r\n\r\n    @with_supported_dtypes(\r\n        {\"2.5.0 and below\": (\"bool\", \"uint8\", \"int8\", \"int16\", \"int32\", \"int64\")},\r\n        \"paddle\",\r\n    )\r\n    def bitwise_xor(self, y, out=None, name=None):\r\n        return paddle_frontend.bitwise_xor(self, y)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def any(self, axis=None, keepdim=False, name=None):\r\n        return ivy.any(self._ivy_array, axis=axis, keepdims=keepdim)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def astype(self, dtype):\r\n        return ivy.astype(self._ivy_array, dtype=dtype)\r\n\r\n    @with_supported_dtypes(\r\n        {\r\n            \"2.5.0 and below\": (\r\n                \"bool\",\r\n                \"int8\",\r\n                \"int16\",\r\n                \"int32\",\r\n                \"int64\",\r\n                \"float32\",\r\n                \"float64\",\r\n            )\r\n        },\r\n        \"paddle\",\r\n    )\r\n    def logical_xor(self, y, out=None, name=None):\r\n        return paddle_frontend.logical_xor(self, y, out=out)\r\n\r\n    @with_unsupported_dtypes(\r\n        {\r\n            \"2.5.0 and below\": (\r\n                \"bool\",\r\n                \"uint8\",\r\n                \"int8\",\r\n                \"int16\",\r\n                \"complex64\",\r\n                \"complex128\",\r\n            )\r\n        },\r\n        \"paddle\",\r\n    )\r\n    def greater_than(self, y, name=None):\r\n        return paddle_frontend.greater_than(self, y)\r\n\r\n    @with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\r\n    def rsqrt(self, name=None):\r\n        return ivy.reciprocal(ivy.sqrt(self._ivy_array))\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def cumprod(self, dim=None, dtype=None, name=None):\r\n        return ivy.cumprod(self._ivy_array, axis=dim, dtype=dtype)\r\n\r\n    @with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\r\n    def cumsum(self, axis=None, dtype=None, name=None):\r\n        return ivy.cumsum(self._ivy_array, axis=axis, dtype=dtype)\r\n\r\n    @with_supported_dtypes(\r\n        {\"2.5.0 and below\": (\"complex64\", \"complex128\", \"float32\", \"float64\")},\r\n        \"paddle\",\r\n    )\r\n    def angle(self, name=None):\r\n        return ivy.angle(self._ivy_array)\r\n", "path": "ivy/functional/frontends/paddle/tensor/tensor.py"}]}