We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
iscomplex
Marked as closed in #10862, yet it's unimplemented.

--- 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/jax/numpy/logic.py`
Content:
```
1 # local
2 import ivy
3 from ivy.functional.frontends.jax.func_wrapper import (
4     to_ivy_arrays_and_back,
5 )
6 from ivy.functional.frontends.jax.numpy import (
7     promote_types_of_jax_inputs as promote_jax_arrays,
8 )
9 
10 
11 @to_ivy_arrays_and_back
12 def allclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False):
13     a, b = promote_jax_arrays(a, b)
14     return ivy.allclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)
15 
16 
17 @to_ivy_arrays_and_back
18 def array_equal(a1, a2, equal_nan: bool) -> bool:
19     a1, a2 = promote_jax_arrays(a1, a2)
20     if ivy.shape(a1) != ivy.shape(a2):
21         return False
22     eq = ivy.asarray(a1 == a2)
23     if equal_nan:
24         eq = ivy.logical_or(eq, ivy.logical_and(ivy.isnan(a1), ivy.isnan(a2)))
25     return ivy.all(eq)
26 
27 
28 @to_ivy_arrays_and_back
29 def array_equiv(a1, a2) -> bool:
30     a1, a2 = promote_jax_arrays(a1, a2)
31     try:
32         eq = ivy.equal(a1, a2)
33     except ValueError:
34         # shapes are not broadcastable
35         return False
36     return ivy.all(eq)
37 
38 
39 @to_ivy_arrays_and_back
40 def isneginf(x, out=None):
41     return ivy.isneginf(x, out=out)
42 
43 
44 @to_ivy_arrays_and_back
45 def isposinf(x, out=None):
46     return ivy.isposinf(x, out=out)
47 
48 
49 @to_ivy_arrays_and_back
50 def not_equal(x1, x2):
51     x1, x2 = promote_jax_arrays(x1, x2)
52     return ivy.not_equal(x1, x2)
53 
54 
55 @to_ivy_arrays_and_back
56 def less(x1, x2):
57     x1, x2 = promote_jax_arrays(x1, x2)
58     return ivy.less(x1, x2)
59 
60 
61 @to_ivy_arrays_and_back
62 def less_equal(x1, x2):
63     x1, x2 = promote_jax_arrays(x1, x2)
64     return ivy.less_equal(x1, x2)
65 
66 
67 @to_ivy_arrays_and_back
68 def greater(x1, x2):
69     x1, x2 = promote_jax_arrays(x1, x2)
70     return ivy.greater(x1, x2)
71 
72 
73 @to_ivy_arrays_and_back
74 def greater_equal(x1, x2):
75     x1, x2 = promote_jax_arrays(x1, x2)
76     return ivy.greater_equal(x1, x2)
77 
78 
79 @to_ivy_arrays_and_back
80 def isnan(x, out=None):
81     return ivy.isnan(x, out=out)
82 
83 
84 @to_ivy_arrays_and_back
85 def equal(x1, x2):
86     x1, x2 = promote_jax_arrays(x1, x2)
87     return ivy.equal(x1, x2)
88 
89 
90 @to_ivy_arrays_and_back
91 def all(a, axis=None, out=None, keepdims=False, *, where=False):
92     return ivy.all(a, axis=axis, keepdims=keepdims, out=out)
93 
94 
95 @to_ivy_arrays_and_back
96 def bitwise_and(x1, x2):
97     x1, x2 = promote_jax_arrays(x1, x2)
98     return ivy.bitwise_and(x1, x2)
99 
100 
101 @to_ivy_arrays_and_back
102 def bitwise_not(x):
103     return ivy.bitwise_invert(x)
104 
105 
106 @to_ivy_arrays_and_back
107 def bitwise_or(x1, x2):
108     x1, x2 = promote_jax_arrays(x1, x2)
109     return ivy.bitwise_or(x1, x2)
110 
111 
112 @to_ivy_arrays_and_back
113 def bitwise_xor(x1, x2):
114     x1, x2 = promote_jax_arrays(x1, x2)
115     return ivy.bitwise_xor(x1, x2)
116 
117 
118 @to_ivy_arrays_and_back
119 def any(a, axis=None, out=None, keepdims=False, *, where=None):
120     # TODO: Out not supported
121     ret = ivy.any(a, axis=axis, keepdims=keepdims)
122     if ivy.is_array(where):
123         where = ivy.array(where, dtype=ivy.bool)
124         ret = ivy.where(where, ret, ivy.default(None, ivy.zeros_like(ret)))
125     return ret
126 
127 
128 alltrue = all
129 
130 
131 sometrue = any
132 
133 
134 @to_ivy_arrays_and_back
135 # known issue in jnp's documentation of arguments
136 # https://github.com/google/jax/issues/9119
137 def logical_and(x1, x2, /):
138     if x1.dtype == "complex128" or x2.dtype == "complex128":
139         x1 = ivy.astype(x1, ivy.complex128)
140         x2 = ivy.astype(x2, ivy.complex128)
141     else:
142         x1, x2 = promote_jax_arrays(x1, x2)
143     return ivy.logical_and(x1, x2)
144 
145 
146 @to_ivy_arrays_and_back
147 def invert(x, /):
148     return ivy.bitwise_invert(x)
149 
150 
151 @to_ivy_arrays_and_back
152 def isfinite(x, /):
153     return ivy.isfinite(x)
154 
155 
156 @to_ivy_arrays_and_back
157 def isinf(x, /):
158     return ivy.isinf(x)
159 
160 
161 @to_ivy_arrays_and_back
162 def isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False):
163     a, b = promote_jax_arrays(a, b)
164     return ivy.isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)
165 
166 
167 @to_ivy_arrays_and_back
168 def logical_not(x, /):
169     return ivy.logical_not(x)
170 
171 
172 @to_ivy_arrays_and_back
173 def logical_or(x1, x2, /):
174     x1, x2 = promote_jax_arrays(x1, x2)
175     return ivy.logical_or(x1, x2)
176 
177 
178 @to_ivy_arrays_and_back
179 def isscalar(x, /):
180     return ivy.isscalar(x)
181 
182 
183 @to_ivy_arrays_and_back
184 def left_shift(x1, x2):
185     return ivy.isscalar(x1, x2)
186 
187 
188 @to_ivy_arrays_and_back
189 def isreal(x, out=None):
190     return ivy.isreal(x, out=out)
191 
192 
193 @to_ivy_arrays_and_back
194 def logical_xor(x1, x2, /):
195     x1, x2 = promote_jax_arrays(x1, x2)
196     return ivy.logical_xor(x1, x2)
197 
198 
199 @to_ivy_arrays_and_back
200 def right_shift(x1, x2, /):
201     return ivy.bitwise_right_shift(x1, x2)
202 
203 
204 @to_ivy_arrays_and_back
205 def isrealobj(x: any):
206     return not ivy.is_complex_dtype(ivy.dtype(x))
207 
208
```
--- 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/jax/numpy/logic.py b/ivy/functional/frontends/jax/numpy/logic.py
--- a/ivy/functional/frontends/jax/numpy/logic.py
+++ b/ivy/functional/frontends/jax/numpy/logic.py
@@ -205,3 +205,7 @@
 def isrealobj(x: any):
     return not ivy.is_complex_dtype(ivy.dtype(x))
 
+
+@to_ivy_arrays_and_back
+def iscomplex(x: any):
+    return ivy.bitwise_invert(ivy.isreal(x))

{"golden_diff": "diff --git a/ivy/functional/frontends/jax/numpy/logic.py b/ivy/functional/frontends/jax/numpy/logic.py\n--- a/ivy/functional/frontends/jax/numpy/logic.py\n+++ b/ivy/functional/frontends/jax/numpy/logic.py\n@@ -205,3 +205,7 @@\n def isrealobj(x: any):\n     return not ivy.is_complex_dtype(ivy.dtype(x))\n \n+\n+@to_ivy_arrays_and_back\n+def iscomplex(x: any):\n+    return ivy.bitwise_invert(ivy.isreal(x))\n", "issue": "iscomplex\nMarked as closed in #10862, yet it's unimplemented.\n", "before_files": [{"content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import (\n    to_ivy_arrays_and_back,\n)\nfrom ivy.functional.frontends.jax.numpy import (\n    promote_types_of_jax_inputs as promote_jax_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef allclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False):\n    a, b = promote_jax_arrays(a, b)\n    return ivy.allclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)\n\n\n@to_ivy_arrays_and_back\ndef array_equal(a1, a2, equal_nan: bool) -> bool:\n    a1, a2 = promote_jax_arrays(a1, a2)\n    if ivy.shape(a1) != ivy.shape(a2):\n        return False\n    eq = ivy.asarray(a1 == a2)\n    if equal_nan:\n        eq = ivy.logical_or(eq, ivy.logical_and(ivy.isnan(a1), ivy.isnan(a2)))\n    return ivy.all(eq)\n\n\n@to_ivy_arrays_and_back\ndef array_equiv(a1, a2) -> bool:\n    a1, a2 = promote_jax_arrays(a1, a2)\n    try:\n        eq = ivy.equal(a1, a2)\n    except ValueError:\n        # shapes are not broadcastable\n        return False\n    return ivy.all(eq)\n\n\n@to_ivy_arrays_and_back\ndef isneginf(x, out=None):\n    return ivy.isneginf(x, out=out)\n\n\n@to_ivy_arrays_and_back\ndef isposinf(x, out=None):\n    return ivy.isposinf(x, out=out)\n\n\n@to_ivy_arrays_and_back\ndef not_equal(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.not_equal(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef less(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.less(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef less_equal(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.less_equal(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef greater(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.greater(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef greater_equal(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.greater_equal(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef isnan(x, out=None):\n    return ivy.isnan(x, out=out)\n\n\n@to_ivy_arrays_and_back\ndef equal(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.equal(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef all(a, axis=None, out=None, keepdims=False, *, where=False):\n    return ivy.all(a, axis=axis, keepdims=keepdims, out=out)\n\n\n@to_ivy_arrays_and_back\ndef bitwise_and(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.bitwise_and(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef bitwise_not(x):\n    return ivy.bitwise_invert(x)\n\n\n@to_ivy_arrays_and_back\ndef bitwise_or(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.bitwise_or(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef bitwise_xor(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.bitwise_xor(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef any(a, axis=None, out=None, keepdims=False, *, where=None):\n    # TODO: Out not supported\n    ret = ivy.any(a, axis=axis, keepdims=keepdims)\n    if ivy.is_array(where):\n        where = ivy.array(where, dtype=ivy.bool)\n        ret = ivy.where(where, ret, ivy.default(None, ivy.zeros_like(ret)))\n    return ret\n\n\nalltrue = all\n\n\nsometrue = any\n\n\n@to_ivy_arrays_and_back\n# known issue in jnp's documentation of arguments\n# https://github.com/google/jax/issues/9119\ndef logical_and(x1, x2, /):\n    if x1.dtype == \"complex128\" or x2.dtype == \"complex128\":\n        x1 = ivy.astype(x1, ivy.complex128)\n        x2 = ivy.astype(x2, ivy.complex128)\n    else:\n        x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.logical_and(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef invert(x, /):\n    return ivy.bitwise_invert(x)\n\n\n@to_ivy_arrays_and_back\ndef isfinite(x, /):\n    return ivy.isfinite(x)\n\n\n@to_ivy_arrays_and_back\ndef isinf(x, /):\n    return ivy.isinf(x)\n\n\n@to_ivy_arrays_and_back\ndef isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False):\n    a, b = promote_jax_arrays(a, b)\n    return ivy.isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)\n\n\n@to_ivy_arrays_and_back\ndef logical_not(x, /):\n    return ivy.logical_not(x)\n\n\n@to_ivy_arrays_and_back\ndef logical_or(x1, x2, /):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.logical_or(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef isscalar(x, /):\n    return ivy.isscalar(x)\n\n\n@to_ivy_arrays_and_back\ndef left_shift(x1, x2):\n    return ivy.isscalar(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef isreal(x, out=None):\n    return ivy.isreal(x, out=out)\n\n\n@to_ivy_arrays_and_back\ndef logical_xor(x1, x2, /):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.logical_xor(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef right_shift(x1, x2, /):\n    return ivy.bitwise_right_shift(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef isrealobj(x: any):\n    return not ivy.is_complex_dtype(ivy.dtype(x))\n\n", "path": "ivy/functional/frontends/jax/numpy/logic.py"}], "after_files": [{"content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import (\n    to_ivy_arrays_and_back,\n)\nfrom ivy.functional.frontends.jax.numpy import (\n    promote_types_of_jax_inputs as promote_jax_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef allclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False):\n    a, b = promote_jax_arrays(a, b)\n    return ivy.allclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)\n\n\n@to_ivy_arrays_and_back\ndef array_equal(a1, a2, equal_nan: bool) -> bool:\n    a1, a2 = promote_jax_arrays(a1, a2)\n    if ivy.shape(a1) != ivy.shape(a2):\n        return False\n    eq = ivy.asarray(a1 == a2)\n    if equal_nan:\n        eq = ivy.logical_or(eq, ivy.logical_and(ivy.isnan(a1), ivy.isnan(a2)))\n    return ivy.all(eq)\n\n\n@to_ivy_arrays_and_back\ndef array_equiv(a1, a2) -> bool:\n    a1, a2 = promote_jax_arrays(a1, a2)\n    try:\n        eq = ivy.equal(a1, a2)\n    except ValueError:\n        # shapes are not broadcastable\n        return False\n    return ivy.all(eq)\n\n\n@to_ivy_arrays_and_back\ndef isneginf(x, out=None):\n    return ivy.isneginf(x, out=out)\n\n\n@to_ivy_arrays_and_back\ndef isposinf(x, out=None):\n    return ivy.isposinf(x, out=out)\n\n\n@to_ivy_arrays_and_back\ndef not_equal(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.not_equal(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef less(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.less(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef less_equal(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.less_equal(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef greater(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.greater(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef greater_equal(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.greater_equal(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef isnan(x, out=None):\n    return ivy.isnan(x, out=out)\n\n\n@to_ivy_arrays_and_back\ndef equal(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.equal(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef all(a, axis=None, out=None, keepdims=False, *, where=False):\n    return ivy.all(a, axis=axis, keepdims=keepdims, out=out)\n\n\n@to_ivy_arrays_and_back\ndef bitwise_and(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.bitwise_and(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef bitwise_not(x):\n    return ivy.bitwise_invert(x)\n\n\n@to_ivy_arrays_and_back\ndef bitwise_or(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.bitwise_or(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef bitwise_xor(x1, x2):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.bitwise_xor(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef any(a, axis=None, out=None, keepdims=False, *, where=None):\n    # TODO: Out not supported\n    ret = ivy.any(a, axis=axis, keepdims=keepdims)\n    if ivy.is_array(where):\n        where = ivy.array(where, dtype=ivy.bool)\n        ret = ivy.where(where, ret, ivy.default(None, ivy.zeros_like(ret)))\n    return ret\n\n\nalltrue = all\n\n\nsometrue = any\n\n\n@to_ivy_arrays_and_back\n# known issue in jnp's documentation of arguments\n# https://github.com/google/jax/issues/9119\ndef logical_and(x1, x2, /):\n    if x1.dtype == \"complex128\" or x2.dtype == \"complex128\":\n        x1 = ivy.astype(x1, ivy.complex128)\n        x2 = ivy.astype(x2, ivy.complex128)\n    else:\n        x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.logical_and(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef invert(x, /):\n    return ivy.bitwise_invert(x)\n\n\n@to_ivy_arrays_and_back\ndef isfinite(x, /):\n    return ivy.isfinite(x)\n\n\n@to_ivy_arrays_and_back\ndef isinf(x, /):\n    return ivy.isinf(x)\n\n\n@to_ivy_arrays_and_back\ndef isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False):\n    a, b = promote_jax_arrays(a, b)\n    return ivy.isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)\n\n\n@to_ivy_arrays_and_back\ndef logical_not(x, /):\n    return ivy.logical_not(x)\n\n\n@to_ivy_arrays_and_back\ndef logical_or(x1, x2, /):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.logical_or(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef isscalar(x, /):\n    return ivy.isscalar(x)\n\n\n@to_ivy_arrays_and_back\ndef left_shift(x1, x2):\n    return ivy.isscalar(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef isreal(x, out=None):\n    return ivy.isreal(x, out=out)\n\n\n@to_ivy_arrays_and_back\ndef logical_xor(x1, x2, /):\n    x1, x2 = promote_jax_arrays(x1, x2)\n    return ivy.logical_xor(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef right_shift(x1, x2, /):\n    return ivy.bitwise_right_shift(x1, x2)\n\n\n@to_ivy_arrays_and_back\ndef isrealobj(x: any):\n    return not ivy.is_complex_dtype(ivy.dtype(x))\n\n\n@to_ivy_arrays_and_back\ndef iscomplex(x: any):\n    return ivy.bitwise_invert(ivy.isreal(x))\n", "path": "ivy/functional/frontends/jax/numpy/logic.py"}]}