We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix paddle_math.test_paddle_conj
|   |   |
|---|---|
|numpy|<a href="https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279"><img src=https://img.shields.io/badge/-failure-red></a>
|jax|<a href="https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279"><img src=https://img.shields.io/badge/-failure-red></a>
|tensorflow|<a href="https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279"><img src=https://img.shields.io/badge/-failure-red></a>
|torch|<a href="https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279"><img src=https://img.shields.io/badge/-failure-red></a>
|paddle|<a href="https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279"><img src=https://img.shields.io/badge/-success-success></a>


--- 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/backends/numpy/experimental/elementwise.py`
Content:
```
1 from typing import Optional, Union, Tuple, List
2 import numpy as np
3 import numpy.typing as npt
4 
5 import ivy
6 from ivy import promote_types_of_inputs
7 from ivy.functional.backends.numpy.helpers import _scalar_output_to_0d_array
8 from ivy.func_wrapper import with_unsupported_dtypes
9 from . import backend_version
10 
11 
12 @_scalar_output_to_0d_array
13 @with_unsupported_dtypes({"1.25.1 and below": ("bfloat16",)}, backend_version)
14 def sinc(x: np.ndarray, /, *, out: Optional[np.ndarray] = None) -> np.ndarray:
15     return np.sinc(x).astype(x.dtype)
16 
17 
18 @_scalar_output_to_0d_array
19 def fmax(
20     x1: np.ndarray,
21     x2: np.ndarray,
22     /,
23     *,
24     out: Optional[np.ndarray] = None,
25 ) -> np.ndarray:
26     x1, x2 = promote_types_of_inputs(x1, x2)
27     return np.fmax(
28         x1,
29         x2,
30         out=None,
31         where=True,
32         casting="same_kind",
33         order="K",
34         dtype=None,
35         subok=True,
36     )
37 
38 
39 fmax.support_native_out = True
40 
41 
42 @_scalar_output_to_0d_array
43 def float_power(
44     x1: Union[np.ndarray, float, list, tuple],
45     x2: Union[np.ndarray, float, list, tuple],
46     /,
47     *,
48     out: Optional[np.ndarray] = None,
49 ) -> np.ndarray:
50     x1, x2 = promote_types_of_inputs(x1, x2)
51     return np.float_power(x1, x2, out=out)
52 
53 
54 float_power.support_native_out = True
55 
56 
57 @_scalar_output_to_0d_array
58 def copysign(
59     x1: npt.ArrayLike,
60     x2: npt.ArrayLike,
61     /,
62     *,
63     out: Optional[np.ndarray] = None,
64 ) -> np.ndarray:
65     x1, x2 = promote_types_of_inputs(x1, x2)
66     if not ivy.is_float_dtype(x1):
67         x1 = x1.astype(ivy.default_float_dtype(as_native=True))
68         x2 = x2.astype(ivy.default_float_dtype(as_native=True))
69     return np.copysign(x1, x2, out=out)
70 
71 
72 copysign.support_native_out = True
73 
74 
75 @_scalar_output_to_0d_array
76 def count_nonzero(
77     a: np.ndarray,
78     /,
79     *,
80     axis: Optional[Union[int, Tuple[int, ...]]] = None,
81     keepdims: bool = False,
82     dtype: Optional[np.dtype] = None,
83     out: Optional[np.ndarray] = None,
84 ) -> np.ndarray:
85     if isinstance(axis, list):
86         axis = tuple(axis)
87     ret = np.count_nonzero(a, axis=axis, keepdims=keepdims)
88     if np.isscalar(ret):
89         return np.array(ret, dtype=dtype)
90     return ret.astype(dtype)
91 
92 
93 count_nonzero.support_native_out = False
94 
95 
96 def nansum(
97     x: np.ndarray,
98     /,
99     *,
100     axis: Optional[Union[Tuple[int, ...], int]] = None,
101     dtype: Optional[np.dtype] = None,
102     keepdims: bool = False,
103     out: Optional[np.ndarray] = None,
104 ) -> np.ndarray:
105     if isinstance(axis, list):
106         axis = tuple(axis)
107     return np.nansum(x, axis=axis, dtype=dtype, keepdims=keepdims, out=out)
108 
109 
110 nansum.support_native_out = True
111 
112 
113 def isclose(
114     a: np.ndarray,
115     b: np.ndarray,
116     /,
117     *,
118     rtol: float = 1e-05,
119     atol: float = 1e-08,
120     equal_nan: bool = False,
121     out: Optional[np.ndarray] = None,
122 ) -> np.ndarray:
123     ret = np.isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)
124     if np.isscalar(ret):
125         return np.array(ret, dtype="bool")
126     return ret
127 
128 
129 isclose.support_native_out = False
130 
131 
132 def signbit(
133     x: Union[np.ndarray, float, int, list, tuple],
134     /,
135     *,
136     out: Optional[np.ndarray] = None,
137 ) -> np.ndarray:
138     return np.signbit(x, out=out)
139 
140 
141 signbit.support_native_out = True
142 
143 
144 def hypot(
145     x1: np.ndarray,
146     x2: np.ndarray,
147     /,
148     *,
149     out: Optional[np.ndarray] = None,
150 ) -> np.ndarray:
151     return np.hypot(x1, x2)
152 
153 
154 def diff(
155     x: Union[np.ndarray, list, tuple],
156     /,
157     *,
158     n: int = 1,
159     axis: int = -1,
160     prepend: Optional[Union[np.ndarray, int, float, list, tuple]] = None,
161     append: Optional[Union[np.ndarray, int, float, list, tuple]] = None,
162     out: Optional[np.ndarray] = None,
163 ) -> np.ndarray:
164     prepend = prepend if prepend is not None else np._NoValue
165     append = append if append is not None else np._NoValue
166     return np.diff(x, n=n, axis=axis, prepend=prepend, append=append)
167 
168 
169 diff.support_native_out = False
170 
171 
172 @_scalar_output_to_0d_array
173 def allclose(
174     x1: np.ndarray,
175     x2: np.ndarray,
176     /,
177     *,
178     rtol: float = 1e-05,
179     atol: float = 1e-08,
180     equal_nan: bool = False,
181     out: Optional[np.ndarray] = None,
182 ) -> bool:
183     return np.allclose(x1, x2, rtol=rtol, atol=atol, equal_nan=equal_nan)
184 
185 
186 allclose.support_native_out = False
187 
188 
189 def fix(
190     x: np.ndarray,
191     /,
192     *,
193     out: Optional[np.ndarray] = None,
194 ) -> np.ndarray:
195     return np.fix(x, out=out)
196 
197 
198 fix.support_native_out = True
199 
200 
201 def nextafter(
202     x1: np.ndarray,
203     x2: np.ndarray,
204     /,
205     *,
206     out: Optional[np.ndarray] = None,
207 ) -> np.ndarray:
208     return np.nextafter(x1, x2)
209 
210 
211 nextafter.support_natvie_out = True
212 
213 
214 def zeta(
215     x: np.ndarray,
216     q: np.ndarray,
217     /,
218     *,
219     out: Optional[np.ndarray] = None,
220 ) -> np.ndarray:
221     temp = np.logical_and(np.greater(x, 0), np.equal(np.remainder(x, 2), 0))
222     temp = np.logical_and(temp, np.less_equal(q, 0))
223     temp = np.logical_and(temp, np.equal(np.remainder(q, 1), 0))
224     inf_indices = np.logical_or(temp, np.equal(x, 1))
225     temp = np.logical_and(np.not_equal(np.remainder(x, 2), 0), np.greater(x, 1))
226     temp = np.logical_and(temp, np.less_equal(q, 0))
227     nan_indices = np.logical_or(temp, np.less(x, 1))
228     n, res = 1, 1 / q**x
229     while n < 10000:
230         term = 1 / (q + n) ** x
231         n, res = n + 1, res + term
232     ret = np.round(res, decimals=4)
233     ret[nan_indices] = np.nan
234     ret[inf_indices] = np.inf
235     return ret
236 
237 
238 zeta.support_native_out = False
239 
240 
241 def gradient(
242     x: np.ndarray,
243     /,
244     *,
245     spacing: Union[int, list, tuple] = 1,
246     axis: Optional[Union[int, list, tuple]] = None,
247     edge_order: int = 1,
248 ) -> Union[np.ndarray, List[np.ndarray]]:
249     if type(spacing) in (int, float):
250         return np.gradient(x, spacing, axis=axis, edge_order=edge_order)
251     return np.gradient(x, *spacing, axis=axis, edge_order=edge_order)
252 
253 
254 def xlogy(
255     x: np.ndarray, y: np.ndarray, /, *, out: Optional[np.ndarray] = None
256 ) -> np.ndarray:
257     x, y = promote_types_of_inputs(x, y)
258     if (x == 0).all():
259         return 0.0
260     else:
261         return x * np.log(y)
262 
263 
264 def conj(
265     x: np.ndarray,
266     /,
267     *,
268     out: Optional[np.ndarray] = None,
269 ) -> np.ndarray:
270     ret = np.conj(x, out=out)
271     if x.dtype == np.bool:
272         return ret.astype("bool")
273     return ret
274 
275 
276 def ldexp(
277     x1: np.ndarray,
278     x2: Union[np.ndarray, int, list, tuple],
279     /,
280     *,
281     out: Optional[np.ndarray] = None,
282 ) -> np.ndarray:
283     return np.ldexp(x1, x2, out=out)
284 
285 
286 def frexp(
287     x: np.ndarray, /, *, out: Optional[Tuple[np.ndarray, np.ndarray]] = None
288 ) -> Tuple[np.ndarray, np.ndarray]:
289     if out is None:
290         return np.frexp(x, out=(None, None))
291     else:
292         return np.frexp(x, out=out)
293 
294 
295 def modf(
296     x: np.ndarray,
297     /,
298     *,
299     out: Optional[np.ndarray] = None,
300 ) -> np.ndarray:
301     return np.modf(x, out=out)
302
```
--- 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/backends/numpy/experimental/elementwise.py b/ivy/functional/backends/numpy/experimental/elementwise.py
--- a/ivy/functional/backends/numpy/experimental/elementwise.py
+++ b/ivy/functional/backends/numpy/experimental/elementwise.py
@@ -268,7 +268,7 @@
     out: Optional[np.ndarray] = None,
 ) -> np.ndarray:
     ret = np.conj(x, out=out)
-    if x.dtype == np.bool:
+    if x.dtype == bool:
         return ret.astype("bool")
     return ret

{"golden_diff": "diff --git a/ivy/functional/backends/numpy/experimental/elementwise.py b/ivy/functional/backends/numpy/experimental/elementwise.py\n--- a/ivy/functional/backends/numpy/experimental/elementwise.py\n+++ b/ivy/functional/backends/numpy/experimental/elementwise.py\n@@ -268,7 +268,7 @@\n     out: Optional[np.ndarray] = None,\n ) -> np.ndarray:\n     ret = np.conj(x, out=out)\n-    if x.dtype == np.bool:\n+    if x.dtype == bool:\n         return ret.astype(\"bool\")\n     return ret\n", "issue": "Fix paddle_math.test_paddle_conj\n|   |   |\r\n|---|---|\r\n|numpy|<a href=\"https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279\"><img src=https://img.shields.io/badge/-failure-red></a>\r\n|jax|<a href=\"https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279\"><img src=https://img.shields.io/badge/-failure-red></a>\r\n|tensorflow|<a href=\"https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279\"><img src=https://img.shields.io/badge/-failure-red></a>\r\n|torch|<a href=\"https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279\"><img src=https://img.shields.io/badge/-failure-red></a>\r\n|paddle|<a href=\"https://github.com/unifyai/ivy/actions/runs/6197499538/job/16826154279\"><img src=https://img.shields.io/badge/-success-success></a>\r\n\n", "before_files": [{"content": "from typing import Optional, Union, Tuple, List\nimport numpy as np\nimport numpy.typing as npt\n\nimport ivy\nfrom ivy import promote_types_of_inputs\nfrom ivy.functional.backends.numpy.helpers import _scalar_output_to_0d_array\nfrom ivy.func_wrapper import with_unsupported_dtypes\nfrom . import backend_version\n\n\n@_scalar_output_to_0d_array\n@with_unsupported_dtypes({\"1.25.1 and below\": (\"bfloat16\",)}, backend_version)\ndef sinc(x: np.ndarray, /, *, out: Optional[np.ndarray] = None) -> np.ndarray:\n    return np.sinc(x).astype(x.dtype)\n\n\n@_scalar_output_to_0d_array\ndef fmax(\n    x1: np.ndarray,\n    x2: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    x1, x2 = promote_types_of_inputs(x1, x2)\n    return np.fmax(\n        x1,\n        x2,\n        out=None,\n        where=True,\n        casting=\"same_kind\",\n        order=\"K\",\n        dtype=None,\n        subok=True,\n    )\n\n\nfmax.support_native_out = True\n\n\n@_scalar_output_to_0d_array\ndef float_power(\n    x1: Union[np.ndarray, float, list, tuple],\n    x2: Union[np.ndarray, float, list, tuple],\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    x1, x2 = promote_types_of_inputs(x1, x2)\n    return np.float_power(x1, x2, out=out)\n\n\nfloat_power.support_native_out = True\n\n\n@_scalar_output_to_0d_array\ndef copysign(\n    x1: npt.ArrayLike,\n    x2: npt.ArrayLike,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    x1, x2 = promote_types_of_inputs(x1, x2)\n    if not ivy.is_float_dtype(x1):\n        x1 = x1.astype(ivy.default_float_dtype(as_native=True))\n        x2 = x2.astype(ivy.default_float_dtype(as_native=True))\n    return np.copysign(x1, x2, out=out)\n\n\ncopysign.support_native_out = True\n\n\n@_scalar_output_to_0d_array\ndef count_nonzero(\n    a: np.ndarray,\n    /,\n    *,\n    axis: Optional[Union[int, Tuple[int, ...]]] = None,\n    keepdims: bool = False,\n    dtype: Optional[np.dtype] = None,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    if isinstance(axis, list):\n        axis = tuple(axis)\n    ret = np.count_nonzero(a, axis=axis, keepdims=keepdims)\n    if np.isscalar(ret):\n        return np.array(ret, dtype=dtype)\n    return ret.astype(dtype)\n\n\ncount_nonzero.support_native_out = False\n\n\ndef nansum(\n    x: np.ndarray,\n    /,\n    *,\n    axis: Optional[Union[Tuple[int, ...], int]] = None,\n    dtype: Optional[np.dtype] = None,\n    keepdims: bool = False,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    if isinstance(axis, list):\n        axis = tuple(axis)\n    return np.nansum(x, axis=axis, dtype=dtype, keepdims=keepdims, out=out)\n\n\nnansum.support_native_out = True\n\n\ndef isclose(\n    a: np.ndarray,\n    b: np.ndarray,\n    /,\n    *,\n    rtol: float = 1e-05,\n    atol: float = 1e-08,\n    equal_nan: bool = False,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    ret = np.isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)\n    if np.isscalar(ret):\n        return np.array(ret, dtype=\"bool\")\n    return ret\n\n\nisclose.support_native_out = False\n\n\ndef signbit(\n    x: Union[np.ndarray, float, int, list, tuple],\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.signbit(x, out=out)\n\n\nsignbit.support_native_out = True\n\n\ndef hypot(\n    x1: np.ndarray,\n    x2: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.hypot(x1, x2)\n\n\ndef diff(\n    x: Union[np.ndarray, list, tuple],\n    /,\n    *,\n    n: int = 1,\n    axis: int = -1,\n    prepend: Optional[Union[np.ndarray, int, float, list, tuple]] = None,\n    append: Optional[Union[np.ndarray, int, float, list, tuple]] = None,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    prepend = prepend if prepend is not None else np._NoValue\n    append = append if append is not None else np._NoValue\n    return np.diff(x, n=n, axis=axis, prepend=prepend, append=append)\n\n\ndiff.support_native_out = False\n\n\n@_scalar_output_to_0d_array\ndef allclose(\n    x1: np.ndarray,\n    x2: np.ndarray,\n    /,\n    *,\n    rtol: float = 1e-05,\n    atol: float = 1e-08,\n    equal_nan: bool = False,\n    out: Optional[np.ndarray] = None,\n) -> bool:\n    return np.allclose(x1, x2, rtol=rtol, atol=atol, equal_nan=equal_nan)\n\n\nallclose.support_native_out = False\n\n\ndef fix(\n    x: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.fix(x, out=out)\n\n\nfix.support_native_out = True\n\n\ndef nextafter(\n    x1: np.ndarray,\n    x2: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.nextafter(x1, x2)\n\n\nnextafter.support_natvie_out = True\n\n\ndef zeta(\n    x: np.ndarray,\n    q: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    temp = np.logical_and(np.greater(x, 0), np.equal(np.remainder(x, 2), 0))\n    temp = np.logical_and(temp, np.less_equal(q, 0))\n    temp = np.logical_and(temp, np.equal(np.remainder(q, 1), 0))\n    inf_indices = np.logical_or(temp, np.equal(x, 1))\n    temp = np.logical_and(np.not_equal(np.remainder(x, 2), 0), np.greater(x, 1))\n    temp = np.logical_and(temp, np.less_equal(q, 0))\n    nan_indices = np.logical_or(temp, np.less(x, 1))\n    n, res = 1, 1 / q**x\n    while n < 10000:\n        term = 1 / (q + n) ** x\n        n, res = n + 1, res + term\n    ret = np.round(res, decimals=4)\n    ret[nan_indices] = np.nan\n    ret[inf_indices] = np.inf\n    return ret\n\n\nzeta.support_native_out = False\n\n\ndef gradient(\n    x: np.ndarray,\n    /,\n    *,\n    spacing: Union[int, list, tuple] = 1,\n    axis: Optional[Union[int, list, tuple]] = None,\n    edge_order: int = 1,\n) -> Union[np.ndarray, List[np.ndarray]]:\n    if type(spacing) in (int, float):\n        return np.gradient(x, spacing, axis=axis, edge_order=edge_order)\n    return np.gradient(x, *spacing, axis=axis, edge_order=edge_order)\n\n\ndef xlogy(\n    x: np.ndarray, y: np.ndarray, /, *, out: Optional[np.ndarray] = None\n) -> np.ndarray:\n    x, y = promote_types_of_inputs(x, y)\n    if (x == 0).all():\n        return 0.0\n    else:\n        return x * np.log(y)\n\n\ndef conj(\n    x: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    ret = np.conj(x, out=out)\n    if x.dtype == np.bool:\n        return ret.astype(\"bool\")\n    return ret\n\n\ndef ldexp(\n    x1: np.ndarray,\n    x2: Union[np.ndarray, int, list, tuple],\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.ldexp(x1, x2, out=out)\n\n\ndef frexp(\n    x: np.ndarray, /, *, out: Optional[Tuple[np.ndarray, np.ndarray]] = None\n) -> Tuple[np.ndarray, np.ndarray]:\n    if out is None:\n        return np.frexp(x, out=(None, None))\n    else:\n        return np.frexp(x, out=out)\n\n\ndef modf(\n    x: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.modf(x, out=out)\n", "path": "ivy/functional/backends/numpy/experimental/elementwise.py"}], "after_files": [{"content": "from typing import Optional, Union, Tuple, List\nimport numpy as np\nimport numpy.typing as npt\n\nimport ivy\nfrom ivy import promote_types_of_inputs\nfrom ivy.functional.backends.numpy.helpers import _scalar_output_to_0d_array\nfrom ivy.func_wrapper import with_unsupported_dtypes\nfrom . import backend_version\n\n\n@_scalar_output_to_0d_array\n@with_unsupported_dtypes({\"1.25.1 and below\": (\"bfloat16\",)}, backend_version)\ndef sinc(x: np.ndarray, /, *, out: Optional[np.ndarray] = None) -> np.ndarray:\n    return np.sinc(x).astype(x.dtype)\n\n\n@_scalar_output_to_0d_array\ndef fmax(\n    x1: np.ndarray,\n    x2: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    x1, x2 = promote_types_of_inputs(x1, x2)\n    return np.fmax(\n        x1,\n        x2,\n        out=None,\n        where=True,\n        casting=\"same_kind\",\n        order=\"K\",\n        dtype=None,\n        subok=True,\n    )\n\n\nfmax.support_native_out = True\n\n\n@_scalar_output_to_0d_array\ndef float_power(\n    x1: Union[np.ndarray, float, list, tuple],\n    x2: Union[np.ndarray, float, list, tuple],\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    x1, x2 = promote_types_of_inputs(x1, x2)\n    return np.float_power(x1, x2, out=out)\n\n\nfloat_power.support_native_out = True\n\n\n@_scalar_output_to_0d_array\ndef copysign(\n    x1: npt.ArrayLike,\n    x2: npt.ArrayLike,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    x1, x2 = promote_types_of_inputs(x1, x2)\n    if not ivy.is_float_dtype(x1):\n        x1 = x1.astype(ivy.default_float_dtype(as_native=True))\n        x2 = x2.astype(ivy.default_float_dtype(as_native=True))\n    return np.copysign(x1, x2, out=out)\n\n\ncopysign.support_native_out = True\n\n\n@_scalar_output_to_0d_array\ndef count_nonzero(\n    a: np.ndarray,\n    /,\n    *,\n    axis: Optional[Union[int, Tuple[int, ...]]] = None,\n    keepdims: bool = False,\n    dtype: Optional[np.dtype] = None,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    if isinstance(axis, list):\n        axis = tuple(axis)\n    ret = np.count_nonzero(a, axis=axis, keepdims=keepdims)\n    if np.isscalar(ret):\n        return np.array(ret, dtype=dtype)\n    return ret.astype(dtype)\n\n\ncount_nonzero.support_native_out = False\n\n\ndef nansum(\n    x: np.ndarray,\n    /,\n    *,\n    axis: Optional[Union[Tuple[int, ...], int]] = None,\n    dtype: Optional[np.dtype] = None,\n    keepdims: bool = False,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    if isinstance(axis, list):\n        axis = tuple(axis)\n    return np.nansum(x, axis=axis, dtype=dtype, keepdims=keepdims, out=out)\n\n\nnansum.support_native_out = True\n\n\ndef isclose(\n    a: np.ndarray,\n    b: np.ndarray,\n    /,\n    *,\n    rtol: float = 1e-05,\n    atol: float = 1e-08,\n    equal_nan: bool = False,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    ret = np.isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)\n    if np.isscalar(ret):\n        return np.array(ret, dtype=\"bool\")\n    return ret\n\n\nisclose.support_native_out = False\n\n\ndef signbit(\n    x: Union[np.ndarray, float, int, list, tuple],\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.signbit(x, out=out)\n\n\nsignbit.support_native_out = True\n\n\ndef hypot(\n    x1: np.ndarray,\n    x2: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.hypot(x1, x2)\n\n\ndef diff(\n    x: Union[np.ndarray, list, tuple],\n    /,\n    *,\n    n: int = 1,\n    axis: int = -1,\n    prepend: Optional[Union[np.ndarray, int, float, list, tuple]] = None,\n    append: Optional[Union[np.ndarray, int, float, list, tuple]] = None,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    prepend = prepend if prepend is not None else np._NoValue\n    append = append if append is not None else np._NoValue\n    return np.diff(x, n=n, axis=axis, prepend=prepend, append=append)\n\n\ndiff.support_native_out = False\n\n\n@_scalar_output_to_0d_array\ndef allclose(\n    x1: np.ndarray,\n    x2: np.ndarray,\n    /,\n    *,\n    rtol: float = 1e-05,\n    atol: float = 1e-08,\n    equal_nan: bool = False,\n    out: Optional[np.ndarray] = None,\n) -> bool:\n    return np.allclose(x1, x2, rtol=rtol, atol=atol, equal_nan=equal_nan)\n\n\nallclose.support_native_out = False\n\n\ndef fix(\n    x: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.fix(x, out=out)\n\n\nfix.support_native_out = True\n\n\ndef nextafter(\n    x1: np.ndarray,\n    x2: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.nextafter(x1, x2)\n\n\nnextafter.support_natvie_out = True\n\n\ndef zeta(\n    x: np.ndarray,\n    q: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    temp = np.logical_and(np.greater(x, 0), np.equal(np.remainder(x, 2), 0))\n    temp = np.logical_and(temp, np.less_equal(q, 0))\n    temp = np.logical_and(temp, np.equal(np.remainder(q, 1), 0))\n    inf_indices = np.logical_or(temp, np.equal(x, 1))\n    temp = np.logical_and(np.not_equal(np.remainder(x, 2), 0), np.greater(x, 1))\n    temp = np.logical_and(temp, np.less_equal(q, 0))\n    nan_indices = np.logical_or(temp, np.less(x, 1))\n    n, res = 1, 1 / q**x\n    while n < 10000:\n        term = 1 / (q + n) ** x\n        n, res = n + 1, res + term\n    ret = np.round(res, decimals=4)\n    ret[nan_indices] = np.nan\n    ret[inf_indices] = np.inf\n    return ret\n\n\nzeta.support_native_out = False\n\n\ndef gradient(\n    x: np.ndarray,\n    /,\n    *,\n    spacing: Union[int, list, tuple] = 1,\n    axis: Optional[Union[int, list, tuple]] = None,\n    edge_order: int = 1,\n) -> Union[np.ndarray, List[np.ndarray]]:\n    if type(spacing) in (int, float):\n        return np.gradient(x, spacing, axis=axis, edge_order=edge_order)\n    return np.gradient(x, *spacing, axis=axis, edge_order=edge_order)\n\n\ndef xlogy(\n    x: np.ndarray, y: np.ndarray, /, *, out: Optional[np.ndarray] = None\n) -> np.ndarray:\n    x, y = promote_types_of_inputs(x, y)\n    if (x == 0).all():\n        return 0.0\n    else:\n        return x * np.log(y)\n\n\ndef conj(\n    x: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    ret = np.conj(x, out=out)\n    if x.dtype == bool:\n        return ret.astype(\"bool\")\n    return ret\n\n\ndef ldexp(\n    x1: np.ndarray,\n    x2: Union[np.ndarray, int, list, tuple],\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.ldexp(x1, x2, out=out)\n\n\ndef frexp(\n    x: np.ndarray, /, *, out: Optional[Tuple[np.ndarray, np.ndarray]] = None\n) -> Tuple[np.ndarray, np.ndarray]:\n    if out is None:\n        return np.frexp(x, out=(None, None))\n    else:\n        return np.frexp(x, out=out)\n\n\ndef modf(\n    x: np.ndarray,\n    /,\n    *,\n    out: Optional[np.ndarray] = None,\n) -> np.ndarray:\n    return np.modf(x, out=out)\n", "path": "ivy/functional/backends/numpy/experimental/elementwise.py"}]}