prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  cross
  
  
  --- 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 # matmul
  11 @with_unsupported_dtypes({"2.4.2 and below": ("float16", "bfloat16")}, "paddle")
  12 @to_ivy_arrays_and_back
  13 def matmul(x, y, transpose_x=False, transpose_y=False, name=None):
  14     x, y = promote_types_of_paddle_inputs(x, y)
  15     return ivy.matmul(x, y, transpose_a=transpose_x, transpose_b=transpose_y)
  16 
  17 
  18 # norm
  19 @with_supported_dtypes({"2.4.2 and below": ("float32", "float64")}, "paddle")
  20 @to_ivy_arrays_and_back
  21 def norm(x, p="fro", axis=None, keepdim=False, name=None):
  22     if axis is None and p is not None:
  23         if p == "fro":
  24             p = 2
  25         ret = ivy.vector_norm(x.flatten(), ord=p, axis=-1)
  26         if keepdim:
  27             ret = ret.reshape([1] * len(x.shape))
  28         if len(ret.shape) == 0:
  29             return ivy.array([ret])
  30         return ret
  31 
  32     if isinstance(axis, tuple):
  33         axis = list(axis)
  34     if isinstance(axis, list) and len(axis) == 1:
  35         axis = axis[0]
  36 
  37     if isinstance(axis, int):
  38         if p == "fro":
  39             p = 2
  40         if p in [0, 1, 2, ivy.inf, -ivy.inf]:
  41             ret = ivy.vector_norm(x, ord=p, axis=axis, keepdims=keepdim)
  42         elif isinstance(p, (int, float)):
  43             ret = ivy.pow(
  44                 ivy.sum(ivy.pow(ivy.abs(x), p), axis=axis, keepdims=keepdim),
  45                 float(1.0 / p),
  46             )
  47 
  48     elif isinstance(axis, list) and len(axis) == 2:
  49         if p == 0:
  50             raise ValueError
  51         elif p == 1:
  52             ret = ivy.sum(ivy.abs(x), axis=axis, keepdims=keepdim)
  53         elif p == 2 or p == "fro":
  54             ret = ivy.matrix_norm(x, ord="fro", axis=axis, keepdims=keepdim)
  55         elif p == ivy.inf:
  56             ret = ivy.max(ivy.abs(x), axis=axis, keepdims=keepdim)
  57         elif p == -ivy.inf:
  58             ret = ivy.min(ivy.abs(x), axis=axis, keepdims=keepdim)
  59         elif isinstance(p, (int, float)) and p > 0:
  60             ret = ivy.pow(
  61                 ivy.sum(ivy.pow(ivy.abs(x), p), axis=axis, keepdims=keepdim),
  62                 float(1.0 / p),
  63             )
  64         else:
  65             raise ValueError
  66 
  67     else:
  68         raise ValueError
  69 
  70     if len(ret.shape) == 0:
  71         ret = ivy.array(
  72             [ret]
  73         )  # this is done so as to match shape of output from paddle
  74     return ret
  75 
  76 
  77 # eig
  78 @to_ivy_arrays_and_back
  79 def eig(x, name=None):
  80     return ivy.eig(x)
  81 
  82 
  83 # eigvals
  84 @to_ivy_arrays_and_back
  85 def eigvals(x, name=None):
  86     return ivy.eigvals(x)
  87 
  88 
  89 # eigvalsh
  90 @to_ivy_arrays_and_back
  91 def eigvalsh(x, UPLO="L", name=None):
  92     return ivy.eigvalsh(x, UPLO=UPLO)
  93 
  94 
  95 # eigh
  96 @to_ivy_arrays_and_back
  97 def eigh(x, UPLO="L", name=None):
  98     return ivy.eigh(x, UPLO=UPLO)
  99 
  100 
  101 # pinv
  102 @with_unsupported_dtypes({"2.4.2 and below": ("float16", "bfloat16")}, "paddle")
  103 @to_ivy_arrays_and_back
  104 def pinv(x, rcond=1e-15, hermitian=False, name=None):
  105     # TODO: Add hermitian functionality
  106     return ivy.pinv(x, rtol=rcond)
  107
  ```
  --- 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()
  
  ```
  
golden_diff: 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
  @@ -7,6 +7,15 @@
   )
   
   
  +@with_supported_dtypes(
  +    {"2.4.2 and below": ("float32", "float64", "int32", "int64")}, "paddle"
  +)
  +@to_ivy_arrays_and_back
  +def cross(x, y, /, *, axis=9, name=None):
  +    x, y = promote_types_of_paddle_inputs(x, y)
  +    return ivy.cross(x, y, axis=axis)
  +
  +
   # matmul
   @with_unsupported_dtypes({"2.4.2 and below": ("float16", "bfloat16")}, "paddle")
   @to_ivy_arrays_and_back
  
verification_info: {"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@@ -7,6 +7,15 @@\n )\n \n \n+@with_supported_dtypes(\n+    {\"2.4.2 and below\": (\"float32\", \"float64\", \"int32\", \"int64\")}, \"paddle\"\n+)\n+@to_ivy_arrays_and_back\n+def 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 # matmul\n @with_unsupported_dtypes({\"2.4.2 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n @to_ivy_arrays_and_back\n", "issue": "cross\n\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# matmul\n@with_unsupported_dtypes({\"2.4.2 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# norm\n@with_supported_dtypes({\"2.4.2 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# eig\n@to_ivy_arrays_and_back\ndef eig(x, name=None):\n    return ivy.eig(x)\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# eigh\n@to_ivy_arrays_and_back\ndef eigh(x, UPLO=\"L\", name=None):\n    return ivy.eigh(x, UPLO=UPLO)\n\n\n# pinv\n@with_unsupported_dtypes({\"2.4.2 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", "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(\n    {\"2.4.2 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# matmul\n@with_unsupported_dtypes({\"2.4.2 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# norm\n@with_supported_dtypes({\"2.4.2 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# eig\n@to_ivy_arrays_and_back\ndef eig(x, name=None):\n    return ivy.eig(x)\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# eigh\n@to_ivy_arrays_and_back\ndef eigh(x, UPLO=\"L\", name=None):\n    return ivy.eigh(x, UPLO=UPLO)\n\n\n# pinv\n@with_unsupported_dtypes({\"2.4.2 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", "path": "ivy/functional/frontends/paddle/tensor/linalg.py"}]}