We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
qr
Adding the qr function to paddle.tensor.linalg as per the todo issue

--- 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/linalg.py`
Content:
```
1 # global
2 import ivy
3 from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
4 from ivy.functional.frontends.paddle import promote_types_of_paddle_inputs
5 from ivy.functional.frontends.paddle.func_wrapper import (
6     to_ivy_arrays_and_back,
7 )
8 
9 
10 @with_supported_dtypes({"2.4.1 and above": ("int64",)}, "paddle")
11 @to_ivy_arrays_and_back
12 def bincount(x, weights=None, minlength=0, name=None):
13     return ivy.bincount(x, weights=weights, minlength=minlength)
14 
15 
16 # bmm
17 @with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
18 @to_ivy_arrays_and_back
19 def bmm(x, y, transpose_x=False, transpose_y=False, name=None):
20     if len(ivy.shape(x)) != 3 or len(ivy.shape(y)) != 3:
21         raise RuntimeError("input must be 3D matrices")
22     x, y = promote_types_of_paddle_inputs(x, y)
23     return ivy.matmul(x, y, transpose_a=transpose_x, transpose_b=transpose_y)
24 
25 
26 # cholesky
27 @with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
28 @to_ivy_arrays_and_back
29 def cholesky(x, /, *, upper=False, name=None):
30     return ivy.cholesky(x, upper=upper)
31 
32 
33 # cholesky_solve
34 @with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
35 @to_ivy_arrays_and_back
36 def cholesky_solve(x, y, /, *, upper=False, name=None):
37     if upper:
38         y = ivy.matrix_transpose(y)
39     Y = ivy.solve(y, x)
40     return ivy.solve(ivy.matrix_transpose(y), Y)
41 
42 
43 # cond
44 @with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
45 @to_ivy_arrays_and_back
46 def cond(x, p=None, name=None):
47     ret = ivy.cond(x, p=p, out=name)
48     if ret.shape == ():
49         ret = ret.reshape((1,))
50     return ret
51 
52 
53 @with_supported_dtypes(
54     {"2.5.1 and below": ("float32", "float64", "int32", "int64")}, "paddle"
55 )
56 @to_ivy_arrays_and_back
57 def cross(x, y, /, *, axis=9, name=None):
58     x, y = promote_types_of_paddle_inputs(x, y)
59     return ivy.cross(x, y, axis=axis)
60 
61 
62 @with_supported_dtypes({"2.4.1 and above": ("float64", "float32")}, "paddle")
63 @to_ivy_arrays_and_back
64 def dist(x, y, p=2):
65     ret = ivy.vector_norm(ivy.subtract(x, y), ord=p)
66     return ivy.reshape(ret, (1,))
67 
68 
69 # dot
70 @with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
71 @to_ivy_arrays_and_back
72 def dot(x, y, name=None):
73     x, y = promote_types_of_paddle_inputs(x, y)
74     out = ivy.multiply(x, y)
75     return ivy.sum(out, axis=ivy.get_num_dims(x) - 1, keepdims=False)
76 
77 
78 # eig
79 @to_ivy_arrays_and_back
80 def eig(x, name=None):
81     return ivy.eig(x)
82 
83 
84 # eigh
85 @to_ivy_arrays_and_back
86 def eigh(x, UPLO="L", name=None):
87     return ivy.eigh(x, UPLO=UPLO)
88 
89 
90 # eigvals
91 @to_ivy_arrays_and_back
92 def eigvals(x, name=None):
93     return ivy.eigvals(x)
94 
95 
96 # eigvalsh
97 @to_ivy_arrays_and_back
98 def eigvalsh(x, UPLO="L", name=None):
99     return ivy.eigvalsh(x, UPLO=UPLO)
100 
101 
102 # matmul
103 @with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
104 @to_ivy_arrays_and_back
105 def matmul(x, y, transpose_x=False, transpose_y=False, name=None):
106     x, y = promote_types_of_paddle_inputs(x, y)
107     return ivy.matmul(x, y, transpose_a=transpose_x, transpose_b=transpose_y)
108 
109 
110 # matrix_power
111 @with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
112 @to_ivy_arrays_and_back
113 def matrix_power(x, n, name=None):
114     return ivy.matrix_power(x, n)
115 
116 
117 # norm
118 @with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
119 @to_ivy_arrays_and_back
120 def norm(x, p="fro", axis=None, keepdim=False, name=None):
121     if axis is None and p is not None:
122         if p == "fro":
123             p = 2
124         ret = ivy.vector_norm(x.flatten(), ord=p, axis=-1)
125         if keepdim:
126             ret = ret.reshape([1] * len(x.shape))
127         if len(ret.shape) == 0:
128             return ivy.array([ret])
129         return ret
130 
131     if isinstance(axis, tuple):
132         axis = list(axis)
133     if isinstance(axis, list) and len(axis) == 1:
134         axis = axis[0]
135 
136     if isinstance(axis, int):
137         if p == "fro":
138             p = 2
139         if p in [0, 1, 2, ivy.inf, -ivy.inf]:
140             ret = ivy.vector_norm(x, ord=p, axis=axis, keepdims=keepdim)
141         elif isinstance(p, (int, float)):
142             ret = ivy.pow(
143                 ivy.sum(ivy.pow(ivy.abs(x), p), axis=axis, keepdims=keepdim),
144                 float(1.0 / p),
145             )
146 
147     elif isinstance(axis, list) and len(axis) == 2:
148         if p == 0:
149             raise ValueError
150         elif p == 1:
151             ret = ivy.sum(ivy.abs(x), axis=axis, keepdims=keepdim)
152         elif p == 2 or p == "fro":
153             ret = ivy.matrix_norm(x, ord="fro", axis=axis, keepdims=keepdim)
154         elif p == ivy.inf:
155             ret = ivy.max(ivy.abs(x), axis=axis, keepdims=keepdim)
156         elif p == -ivy.inf:
157             ret = ivy.min(ivy.abs(x), axis=axis, keepdims=keepdim)
158         elif isinstance(p, (int, float)) and p > 0:
159             ret = ivy.pow(
160                 ivy.sum(ivy.pow(ivy.abs(x), p), axis=axis, keepdims=keepdim),
161                 float(1.0 / p),
162             )
163         else:
164             raise ValueError
165 
166     else:
167         raise ValueError
168 
169     if len(ret.shape) == 0:
170         ret = ivy.array(
171             [ret]
172         )  # this is done so as to match shape of output from paddle
173     return ret
174 
175 
176 # pinv
177 @with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
178 @to_ivy_arrays_and_back
179 def pinv(x, rcond=1e-15, hermitian=False, name=None):
180     # TODO: Add hermitian functionality
181     return ivy.pinv(x, rtol=rcond)
182 
183 
184 # solve
185 @with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
186 @to_ivy_arrays_and_back
187 def solve(x1, x2, name=None):
188     return ivy.solve(x1, x2)
189 
190 
191 # transpose
192 @with_unsupported_dtypes({"2.5.1 and below": ("uint8", "int8", "int16")}, "paddle")
193 @to_ivy_arrays_and_back
194 def transpose(x, perm, name=None):
195     return ivy.permute_dims(x, axes=perm)
196
```
--- 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/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py
--- a/ivy/functional/frontends/paddle/tensor/linalg.py
+++ b/ivy/functional/frontends/paddle/tensor/linalg.py
@@ -181,6 +181,13 @@
     return ivy.pinv(x, rtol=rcond)
 
 
+# qr
+@with_supported_dtypes({"2.5.1 and below": ("float32", "float64")}, "paddle")
+@to_ivy_arrays_and_back
+def qr(x, mode="reduced", name=None):
+    return ivy.qr(x, mode=mode)
+
+
 # solve
 @with_unsupported_dtypes({"2.5.1 and below": ("float16", "bfloat16")}, "paddle")
 @to_ivy_arrays_and_back

{"golden_diff": "diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py\n--- a/ivy/functional/frontends/paddle/tensor/linalg.py\n+++ b/ivy/functional/frontends/paddle/tensor/linalg.py\n@@ -181,6 +181,13 @@\n     return ivy.pinv(x, rtol=rcond)\n \n \n+# qr\n+@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n+@to_ivy_arrays_and_back\n+def qr(x, mode=\"reduced\", name=None):\n+    return ivy.qr(x, mode=mode)\n+\n+\n # solve\n @with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n @to_ivy_arrays_and_back\n", "issue": "qr\nAdding the qr function to paddle.tensor.linalg as per the todo issue\n", "before_files": [{"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle import promote_types_of_paddle_inputs\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n    to_ivy_arrays_and_back,\n)\n\n\n@with_supported_dtypes({\"2.4.1 and above\": (\"int64\",)}, \"paddle\")\n@to_ivy_arrays_and_back\ndef bincount(x, weights=None, minlength=0, name=None):\n    return ivy.bincount(x, weights=weights, minlength=minlength)\n\n\n# bmm\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef bmm(x, y, transpose_x=False, transpose_y=False, name=None):\n    if len(ivy.shape(x)) != 3 or len(ivy.shape(y)) != 3:\n        raise RuntimeError(\"input must be 3D matrices\")\n    x, y = promote_types_of_paddle_inputs(x, y)\n    return ivy.matmul(x, y, transpose_a=transpose_x, transpose_b=transpose_y)\n\n\n# cholesky\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef cholesky(x, /, *, upper=False, name=None):\n    return ivy.cholesky(x, upper=upper)\n\n\n# cholesky_solve\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef cholesky_solve(x, y, /, *, upper=False, name=None):\n    if upper:\n        y = ivy.matrix_transpose(y)\n    Y = ivy.solve(y, x)\n    return ivy.solve(ivy.matrix_transpose(y), Y)\n\n\n# cond\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef cond(x, p=None, name=None):\n    ret = ivy.cond(x, p=p, out=name)\n    if ret.shape == ():\n        ret = ret.reshape((1,))\n    return ret\n\n\n@with_supported_dtypes(\n    {\"2.5.1 and below\": (\"float32\", \"float64\", \"int32\", \"int64\")}, \"paddle\"\n)\n@to_ivy_arrays_and_back\ndef cross(x, y, /, *, axis=9, name=None):\n    x, y = promote_types_of_paddle_inputs(x, y)\n    return ivy.cross(x, y, axis=axis)\n\n\n@with_supported_dtypes({\"2.4.1 and above\": (\"float64\", \"float32\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef dist(x, y, p=2):\n    ret = ivy.vector_norm(ivy.subtract(x, y), ord=p)\n    return ivy.reshape(ret, (1,))\n\n\n# dot\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef dot(x, y, name=None):\n    x, y = promote_types_of_paddle_inputs(x, y)\n    out = ivy.multiply(x, y)\n    return ivy.sum(out, axis=ivy.get_num_dims(x) - 1, keepdims=False)\n\n\n# eig\n@to_ivy_arrays_and_back\ndef eig(x, name=None):\n    return ivy.eig(x)\n\n\n# eigh\n@to_ivy_arrays_and_back\ndef eigh(x, UPLO=\"L\", name=None):\n    return ivy.eigh(x, UPLO=UPLO)\n\n\n# eigvals\n@to_ivy_arrays_and_back\ndef eigvals(x, name=None):\n    return ivy.eigvals(x)\n\n\n# eigvalsh\n@to_ivy_arrays_and_back\ndef eigvalsh(x, UPLO=\"L\", name=None):\n    return ivy.eigvalsh(x, UPLO=UPLO)\n\n\n# matmul\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef matmul(x, y, transpose_x=False, transpose_y=False, name=None):\n    x, y = promote_types_of_paddle_inputs(x, y)\n    return ivy.matmul(x, y, transpose_a=transpose_x, transpose_b=transpose_y)\n\n\n# matrix_power\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef matrix_power(x, n, name=None):\n    return ivy.matrix_power(x, n)\n\n\n# norm\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef norm(x, p=\"fro\", axis=None, keepdim=False, name=None):\n    if axis is None and p is not None:\n        if p == \"fro\":\n            p = 2\n        ret = ivy.vector_norm(x.flatten(), ord=p, axis=-1)\n        if keepdim:\n            ret = ret.reshape([1] * len(x.shape))\n        if len(ret.shape) == 0:\n            return ivy.array([ret])\n        return ret\n\n    if isinstance(axis, tuple):\n        axis = list(axis)\n    if isinstance(axis, list) and len(axis) == 1:\n        axis = axis[0]\n\n    if isinstance(axis, int):\n        if p == \"fro\":\n            p = 2\n        if p in [0, 1, 2, ivy.inf, -ivy.inf]:\n            ret = ivy.vector_norm(x, ord=p, axis=axis, keepdims=keepdim)\n        elif isinstance(p, (int, float)):\n            ret = ivy.pow(\n                ivy.sum(ivy.pow(ivy.abs(x), p), axis=axis, keepdims=keepdim),\n                float(1.0 / p),\n            )\n\n    elif isinstance(axis, list) and len(axis) == 2:\n        if p == 0:\n            raise ValueError\n        elif p == 1:\n            ret = ivy.sum(ivy.abs(x), axis=axis, keepdims=keepdim)\n        elif p == 2 or p == \"fro\":\n            ret = ivy.matrix_norm(x, ord=\"fro\", axis=axis, keepdims=keepdim)\n        elif p == ivy.inf:\n            ret = ivy.max(ivy.abs(x), axis=axis, keepdims=keepdim)\n        elif p == -ivy.inf:\n            ret = ivy.min(ivy.abs(x), axis=axis, keepdims=keepdim)\n        elif isinstance(p, (int, float)) and p > 0:\n            ret = ivy.pow(\n                ivy.sum(ivy.pow(ivy.abs(x), p), axis=axis, keepdims=keepdim),\n                float(1.0 / p),\n            )\n        else:\n            raise ValueError\n\n    else:\n        raise ValueError\n\n    if len(ret.shape) == 0:\n        ret = ivy.array(\n            [ret]\n        )  # this is done so as to match shape of output from paddle\n    return ret\n\n\n# pinv\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef pinv(x, rcond=1e-15, hermitian=False, name=None):\n    # TODO: Add hermitian functionality\n    return ivy.pinv(x, rtol=rcond)\n\n\n# solve\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef solve(x1, x2, name=None):\n    return ivy.solve(x1, x2)\n\n\n# transpose\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"uint8\", \"int8\", \"int16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef transpose(x, perm, name=None):\n    return ivy.permute_dims(x, axes=perm)\n", "path": "ivy/functional/frontends/paddle/tensor/linalg.py"}], "after_files": [{"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle import promote_types_of_paddle_inputs\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n    to_ivy_arrays_and_back,\n)\n\n\n@with_supported_dtypes({\"2.4.1 and above\": (\"int64\",)}, \"paddle\")\n@to_ivy_arrays_and_back\ndef bincount(x, weights=None, minlength=0, name=None):\n    return ivy.bincount(x, weights=weights, minlength=minlength)\n\n\n# bmm\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef bmm(x, y, transpose_x=False, transpose_y=False, name=None):\n    if len(ivy.shape(x)) != 3 or len(ivy.shape(y)) != 3:\n        raise RuntimeError(\"input must be 3D matrices\")\n    x, y = promote_types_of_paddle_inputs(x, y)\n    return ivy.matmul(x, y, transpose_a=transpose_x, transpose_b=transpose_y)\n\n\n# cholesky\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef cholesky(x, /, *, upper=False, name=None):\n    return ivy.cholesky(x, upper=upper)\n\n\n# cholesky_solve\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef cholesky_solve(x, y, /, *, upper=False, name=None):\n    if upper:\n        y = ivy.matrix_transpose(y)\n    Y = ivy.solve(y, x)\n    return ivy.solve(ivy.matrix_transpose(y), Y)\n\n\n# cond\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef cond(x, p=None, name=None):\n    ret = ivy.cond(x, p=p, out=name)\n    if ret.shape == ():\n        ret = ret.reshape((1,))\n    return ret\n\n\n@with_supported_dtypes(\n    {\"2.5.1 and below\": (\"float32\", \"float64\", \"int32\", \"int64\")}, \"paddle\"\n)\n@to_ivy_arrays_and_back\ndef cross(x, y, /, *, axis=9, name=None):\n    x, y = promote_types_of_paddle_inputs(x, y)\n    return ivy.cross(x, y, axis=axis)\n\n\n@with_supported_dtypes({\"2.4.1 and above\": (\"float64\", \"float32\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef dist(x, y, p=2):\n    ret = ivy.vector_norm(ivy.subtract(x, y), ord=p)\n    return ivy.reshape(ret, (1,))\n\n\n# dot\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef dot(x, y, name=None):\n    x, y = promote_types_of_paddle_inputs(x, y)\n    out = ivy.multiply(x, y)\n    return ivy.sum(out, axis=ivy.get_num_dims(x) - 1, keepdims=False)\n\n\n# eig\n@to_ivy_arrays_and_back\ndef eig(x, name=None):\n    return ivy.eig(x)\n\n\n# eigh\n@to_ivy_arrays_and_back\ndef eigh(x, UPLO=\"L\", name=None):\n    return ivy.eigh(x, UPLO=UPLO)\n\n\n# eigvals\n@to_ivy_arrays_and_back\ndef eigvals(x, name=None):\n    return ivy.eigvals(x)\n\n\n# eigvalsh\n@to_ivy_arrays_and_back\ndef eigvalsh(x, UPLO=\"L\", name=None):\n    return ivy.eigvalsh(x, UPLO=UPLO)\n\n\n# matmul\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef matmul(x, y, transpose_x=False, transpose_y=False, name=None):\n    x, y = promote_types_of_paddle_inputs(x, y)\n    return ivy.matmul(x, y, transpose_a=transpose_x, transpose_b=transpose_y)\n\n\n# matrix_power\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef matrix_power(x, n, name=None):\n    return ivy.matrix_power(x, n)\n\n\n# norm\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef norm(x, p=\"fro\", axis=None, keepdim=False, name=None):\n    if axis is None and p is not None:\n        if p == \"fro\":\n            p = 2\n        ret = ivy.vector_norm(x.flatten(), ord=p, axis=-1)\n        if keepdim:\n            ret = ret.reshape([1] * len(x.shape))\n        if len(ret.shape) == 0:\n            return ivy.array([ret])\n        return ret\n\n    if isinstance(axis, tuple):\n        axis = list(axis)\n    if isinstance(axis, list) and len(axis) == 1:\n        axis = axis[0]\n\n    if isinstance(axis, int):\n        if p == \"fro\":\n            p = 2\n        if p in [0, 1, 2, ivy.inf, -ivy.inf]:\n            ret = ivy.vector_norm(x, ord=p, axis=axis, keepdims=keepdim)\n        elif isinstance(p, (int, float)):\n            ret = ivy.pow(\n                ivy.sum(ivy.pow(ivy.abs(x), p), axis=axis, keepdims=keepdim),\n                float(1.0 / p),\n            )\n\n    elif isinstance(axis, list) and len(axis) == 2:\n        if p == 0:\n            raise ValueError\n        elif p == 1:\n            ret = ivy.sum(ivy.abs(x), axis=axis, keepdims=keepdim)\n        elif p == 2 or p == \"fro\":\n            ret = ivy.matrix_norm(x, ord=\"fro\", axis=axis, keepdims=keepdim)\n        elif p == ivy.inf:\n            ret = ivy.max(ivy.abs(x), axis=axis, keepdims=keepdim)\n        elif p == -ivy.inf:\n            ret = ivy.min(ivy.abs(x), axis=axis, keepdims=keepdim)\n        elif isinstance(p, (int, float)) and p > 0:\n            ret = ivy.pow(\n                ivy.sum(ivy.pow(ivy.abs(x), p), axis=axis, keepdims=keepdim),\n                float(1.0 / p),\n            )\n        else:\n            raise ValueError\n\n    else:\n        raise ValueError\n\n    if len(ret.shape) == 0:\n        ret = ivy.array(\n            [ret]\n        )  # this is done so as to match shape of output from paddle\n    return ret\n\n\n# pinv\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef pinv(x, rcond=1e-15, hermitian=False, name=None):\n    # TODO: Add hermitian functionality\n    return ivy.pinv(x, rtol=rcond)\n\n\n# qr\n@with_supported_dtypes({\"2.5.1 and below\": (\"float32\", \"float64\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef qr(x, mode=\"reduced\", name=None):\n    return ivy.qr(x, mode=mode)\n\n\n# solve\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef solve(x1, x2, name=None):\n    return ivy.solve(x1, x2)\n\n\n# transpose\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"uint8\", \"int8\", \"int16\")}, \"paddle\")\n@to_ivy_arrays_and_back\ndef transpose(x, perm, name=None):\n    return ivy.permute_dims(x, axes=perm)\n", "path": "ivy/functional/frontends/paddle/tensor/linalg.py"}]}