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


--- 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/numpy/mathematical_functions/arithmetic_operations.py`
Content:
```
1 # global
2 import ivy
3 
4 from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs
5 
6 from ivy.functional.frontends.numpy.func_wrapper import (
7     to_ivy_arrays_and_back,
8     handle_numpy_casting,
9     handle_numpy_dtype,
10     from_zero_dim_arrays_to_scalar,
11     handle_numpy_out,
12 )
13 
14 
15 @handle_numpy_out
16 @handle_numpy_dtype
17 @to_ivy_arrays_and_back
18 @handle_numpy_casting
19 @from_zero_dim_arrays_to_scalar
20 def _add(
21     x1,
22     x2,
23     /,
24     out=None,
25     *,
26     where=True,
27     casting="same_kind",
28     order="k",
29     dtype=None,
30     subok=True,
31 ):
32     x1, x2 = promote_types_of_numpy_inputs(x1, x2)
33     ret = ivy.add(x1, x2, out=out)
34     if ivy.is_array(where):
35         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
36     return ret
37 
38 
39 @handle_numpy_out
40 @handle_numpy_dtype
41 @to_ivy_arrays_and_back
42 @handle_numpy_casting
43 @from_zero_dim_arrays_to_scalar
44 def _subtract(
45     x1,
46     x2,
47     /,
48     out=None,
49     *,
50     where=True,
51     casting="same_kind",
52     order="k",
53     dtype=None,
54     subok=True,
55 ):
56     x1, x2 = promote_types_of_numpy_inputs(x1, x2)
57     ret = ivy.subtract(x1, x2, out=out)
58     if ivy.is_array(where):
59         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
60     return ret
61 
62 
63 @handle_numpy_out
64 @handle_numpy_dtype
65 @to_ivy_arrays_and_back
66 @handle_numpy_casting
67 @from_zero_dim_arrays_to_scalar
68 def _divide(
69     x1,
70     x2,
71     /,
72     out=None,
73     *,
74     where=True,
75     casting="same_kind",
76     order="k",
77     dtype=None,
78     subok=True,
79 ):
80     x1, x2 = promote_types_of_numpy_inputs(x1, x2)
81     ret = ivy.divide(x1, x2, out=out)
82     if ivy.is_array(where):
83         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
84     return ret
85 
86 
87 @handle_numpy_out
88 @handle_numpy_dtype
89 @to_ivy_arrays_and_back
90 @handle_numpy_casting
91 @from_zero_dim_arrays_to_scalar
92 def _multiply(
93     x1,
94     x2,
95     /,
96     out=None,
97     *,
98     where=True,
99     casting="same_kind",
100     order="k",
101     dtype=None,
102     subok=True,
103 ):
104     x1, x2 = promote_types_of_numpy_inputs(x1, x2)
105     ret = ivy.multiply(x1, x2, out=out)
106     if ivy.is_array(where):
107         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
108     return ret
109 
110 
111 @handle_numpy_out
112 @handle_numpy_dtype
113 @to_ivy_arrays_and_back
114 @handle_numpy_casting
115 @from_zero_dim_arrays_to_scalar
116 def _power(
117     x1,
118     x2,
119     /,
120     out=None,
121     *,
122     where=True,
123     casting="same_kind",
124     order="k",
125     dtype=None,
126     subok=True,
127 ):
128     x1, x2 = promote_types_of_numpy_inputs(x1, x2)
129     ret = ivy.pow(x1, x2, out=out)
130     if ivy.is_array(where):
131         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
132     return ret
133 
134 
135 @handle_numpy_out
136 @handle_numpy_dtype
137 @to_ivy_arrays_and_back
138 @handle_numpy_casting
139 @from_zero_dim_arrays_to_scalar
140 def _float_power(
141     x1,
142     x2,
143     /,
144     out=None,
145     *,
146     where=True,
147     casting="same_kind",
148     order="k",
149     dtype=None,
150     subok=True,
151 ):
152     x1, x2 = promote_types_of_numpy_inputs(x1, x2)
153     ret = ivy.float_power(x1, x2, out=out)
154     if ivy.is_array(where):
155         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
156     return ret
157 
158 
159 @to_ivy_arrays_and_back
160 @from_zero_dim_arrays_to_scalar
161 def vdot(
162     a,
163     b,
164     /,
165 ):
166     a, b = promote_types_of_numpy_inputs(a, b)
167     return ivy.multiply(a, b).sum()
168 
169 
170 @handle_numpy_out
171 @handle_numpy_dtype
172 @to_ivy_arrays_and_back
173 @handle_numpy_casting
174 @from_zero_dim_arrays_to_scalar
175 def _positive(
176     x,
177     /,
178     out=None,
179     *,
180     where=True,
181     casting="same_kind",
182     order="K",
183     dtype=None,
184     subok=True,
185 ):
186     ret = ivy.positive(x, out=out)
187     if ivy.is_array(where):
188         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
189     return ret
190 
191 
192 @handle_numpy_out
193 @handle_numpy_dtype
194 @to_ivy_arrays_and_back
195 @handle_numpy_casting
196 @from_zero_dim_arrays_to_scalar
197 def _negative(
198     x,
199     /,
200     out=None,
201     *,
202     where=True,
203     casting="same_kind",
204     order="K",
205     dtype=None,
206     subok=True,
207 ):
208     ret = ivy.negative(x, out=out)
209     if ivy.is_array(where):
210         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
211     return ret
212 
213 
214 @handle_numpy_out
215 @handle_numpy_dtype
216 @to_ivy_arrays_and_back
217 @handle_numpy_casting
218 @from_zero_dim_arrays_to_scalar
219 def _floor_divide(
220     x1,
221     x2,
222     /,
223     out=None,
224     *,
225     where=True,
226     casting="same_kind",
227     order="k",
228     dtype=None,
229     subok=True,
230 ):
231     if dtype:
232         x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))
233         x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))
234     ret = ivy.floor_divide(x1, x2, out=out)
235     if ivy.is_array(where):
236         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
237     return ret
238 
239 
240 @handle_numpy_out
241 @handle_numpy_dtype
242 @to_ivy_arrays_and_back
243 @handle_numpy_casting
244 @from_zero_dim_arrays_to_scalar
245 def _reciprocal(
246     x,
247     /,
248     out=None,
249     *,
250     where=True,
251     casting="same_kind",
252     order="K",
253     dtype=None,
254     subok=True,
255 ):
256     if dtype is None:
257         dtype = ivy.as_ivy_dtype(x.dtype)
258     ret = ivy.reciprocal(x, out=out)
259     if ivy.is_array(where):
260         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
261     return ret.astype(dtype)
262 
263 
264 @handle_numpy_out
265 @handle_numpy_dtype
266 @to_ivy_arrays_and_back
267 @handle_numpy_casting
268 @from_zero_dim_arrays_to_scalar
269 def _mod(
270     x1,
271     x2,
272     /,
273     out=None,
274     *,
275     where=True,
276     casting="same_kind",
277     order="K",
278     dtype=None,
279     subok=True,
280 ):
281     if dtype:
282         x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))
283         x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))
284     ret = ivy.remainder(x1, x2, out=out)
285     if ivy.is_array(where):
286         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
287     return ret
288 
289 
290 @handle_numpy_out
291 @handle_numpy_dtype
292 @to_ivy_arrays_and_back
293 @handle_numpy_casting
294 @from_zero_dim_arrays_to_scalar
295 def _modf(
296     x,
297     /,
298     out1_2=(None, None),
299     out=None,
300     *,
301     where=True,
302     casting="same_kind",
303     order="K",
304     dtype=None,
305     subok=True,
306 ):
307     if dtype:
308         x = ivy.astype(ivy.array(x), ivy.as_ivy_dtype(dtype))
309 
310     integral_part = ivy.floor(x)
311     fractional_part = x - integral_part
312 
313     if ivy.is_array(where):
314         integral_part = ivy.where(
315             where,
316             integral_part,
317             ivy.default(out, ivy.zeros_like(integral_part)),
318             out=out,
319         )
320         fractional_part = ivy.where(
321             where,
322             fractional_part,
323             ivy.default(out, ivy.zeros_like(fractional_part)),
324             out=out,
325         )
326 
327     return fractional_part, integral_part
328 
329 
330 @handle_numpy_out
331 @handle_numpy_dtype
332 @to_ivy_arrays_and_back
333 @handle_numpy_casting
334 @from_zero_dim_arrays_to_scalar
335 def _fmod(
336     x1,
337     x2,
338     /,
339     out=None,
340     *,
341     where=True,
342     casting="same_kind",
343     order="K",
344     dtype=None,
345     subok=True,
346 ):
347     if dtype:
348         x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))
349         x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))
350     ret = ivy.fmod(x1, x2, out=out)
351     if ivy.is_array(where):
352         ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
353     return ret
354 
355 
356 @handle_numpy_out
357 @handle_numpy_dtype
358 @to_ivy_arrays_and_back
359 @handle_numpy_casting
360 @from_zero_dim_arrays_to_scalar
361 def _divmod(
362     x1,
363     x2,
364     /,
365     out1_2=(None, None),
366     out=None,
367     *,
368     where=True,
369     casting="same_kind",
370     order="K",
371     dtype=None,
372     subok=True,
373 ):
374     if dtype:
375         x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))
376         x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))
377 
378     ret = [ivy.floor_divide(x1, x2, out=out), ivy.remainder(x1, x2, out=out)]
379     if ivy.is_array(where):
380         ret = ivy.where(
381             where,
382             ret,
383             (
384                 [
385                     ivy.default(out, ivy.zeros_like(ret[0])),
386                     ivy.default(out, ivy.zeros_like(ret[1])),
387                 ]
388             ),
389             out=out,
390         )
391     return ret
392
```
--- 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/numpy/mathematical_functions/arithmetic_operations.py b/ivy/functional/frontends/numpy/mathematical_functions/arithmetic_operations.py
--- a/ivy/functional/frontends/numpy/mathematical_functions/arithmetic_operations.py
+++ b/ivy/functional/frontends/numpy/mathematical_functions/arithmetic_operations.py
@@ -389,3 +389,29 @@
             out=out,
         )
     return ret
+
+
+@handle_numpy_out
+@handle_numpy_dtype
+@to_ivy_arrays_and_back
+@handle_numpy_casting
+@from_zero_dim_arrays_to_scalar
+def remainder(
+    x1,
+    x2,
+    /,
+    out=None,
+    *,
+    where=True,
+    casting="same_kind",
+    order="K",
+    dtype=None,
+    subok=True,
+):
+    if dtype:
+        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))
+        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))
+    ret = ivy.remainder(x1, x2, out=out)
+    if ivy.is_array(where):
+        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)
+    return ret

{"golden_diff": "diff --git a/ivy/functional/frontends/numpy/mathematical_functions/arithmetic_operations.py b/ivy/functional/frontends/numpy/mathematical_functions/arithmetic_operations.py\n--- a/ivy/functional/frontends/numpy/mathematical_functions/arithmetic_operations.py\n+++ b/ivy/functional/frontends/numpy/mathematical_functions/arithmetic_operations.py\n@@ -389,3 +389,29 @@\n             out=out,\n         )\n     return ret\n+\n+\n+@handle_numpy_out\n+@handle_numpy_dtype\n+@to_ivy_arrays_and_back\n+@handle_numpy_casting\n+@from_zero_dim_arrays_to_scalar\n+def remainder(\n+    x1,\n+    x2,\n+    /,\n+    out=None,\n+    *,\n+    where=True,\n+    casting=\"same_kind\",\n+    order=\"K\",\n+    dtype=None,\n+    subok=True,\n+):\n+    if dtype:\n+        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n+        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n+    ret = ivy.remainder(x1, x2, out=out)\n+    if ivy.is_array(where):\n+        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n+    return ret\n", "issue": "remainder\n\n", "before_files": [{"content": "# global\nimport ivy\n\nfrom ivy.functional.frontends.numpy import promote_types_of_numpy_inputs\n\nfrom ivy.functional.frontends.numpy.func_wrapper import (\n    to_ivy_arrays_and_back,\n    handle_numpy_casting,\n    handle_numpy_dtype,\n    from_zero_dim_arrays_to_scalar,\n    handle_numpy_out,\n)\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _add(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.add(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _subtract(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.subtract(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _divide(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.divide(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _multiply(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.multiply(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _power(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.pow(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _float_power(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.float_power(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@to_ivy_arrays_and_back\n@from_zero_dim_arrays_to_scalar\ndef vdot(\n    a,\n    b,\n    /,\n):\n    a, b = promote_types_of_numpy_inputs(a, b)\n    return ivy.multiply(a, b).sum()\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _positive(\n    x,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    ret = ivy.positive(x, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _negative(\n    x,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    ret = ivy.negative(x, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _floor_divide(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n    ret = ivy.floor_divide(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _reciprocal(\n    x,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype is None:\n        dtype = ivy.as_ivy_dtype(x.dtype)\n    ret = ivy.reciprocal(x, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret.astype(dtype)\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _mod(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n    ret = ivy.remainder(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _modf(\n    x,\n    /,\n    out1_2=(None, None),\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x = ivy.astype(ivy.array(x), ivy.as_ivy_dtype(dtype))\n\n    integral_part = ivy.floor(x)\n    fractional_part = x - integral_part\n\n    if ivy.is_array(where):\n        integral_part = ivy.where(\n            where,\n            integral_part,\n            ivy.default(out, ivy.zeros_like(integral_part)),\n            out=out,\n        )\n        fractional_part = ivy.where(\n            where,\n            fractional_part,\n            ivy.default(out, ivy.zeros_like(fractional_part)),\n            out=out,\n        )\n\n    return fractional_part, integral_part\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _fmod(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n    ret = ivy.fmod(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _divmod(\n    x1,\n    x2,\n    /,\n    out1_2=(None, None),\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n\n    ret = [ivy.floor_divide(x1, x2, out=out), ivy.remainder(x1, x2, out=out)]\n    if ivy.is_array(where):\n        ret = ivy.where(\n            where,\n            ret,\n            (\n                [\n                    ivy.default(out, ivy.zeros_like(ret[0])),\n                    ivy.default(out, ivy.zeros_like(ret[1])),\n                ]\n            ),\n            out=out,\n        )\n    return ret\n", "path": "ivy/functional/frontends/numpy/mathematical_functions/arithmetic_operations.py"}], "after_files": [{"content": "# global\nimport ivy\n\nfrom ivy.functional.frontends.numpy import promote_types_of_numpy_inputs\n\nfrom ivy.functional.frontends.numpy.func_wrapper import (\n    to_ivy_arrays_and_back,\n    handle_numpy_casting,\n    handle_numpy_dtype,\n    from_zero_dim_arrays_to_scalar,\n    handle_numpy_out,\n)\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _add(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.add(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _subtract(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.subtract(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _divide(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.divide(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _multiply(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.multiply(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _power(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.pow(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _float_power(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    x1, x2 = promote_types_of_numpy_inputs(x1, x2)\n    ret = ivy.float_power(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@to_ivy_arrays_and_back\n@from_zero_dim_arrays_to_scalar\ndef vdot(\n    a,\n    b,\n    /,\n):\n    a, b = promote_types_of_numpy_inputs(a, b)\n    return ivy.multiply(a, b).sum()\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _positive(\n    x,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    ret = ivy.positive(x, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _negative(\n    x,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    ret = ivy.negative(x, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _floor_divide(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"k\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n    ret = ivy.floor_divide(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _reciprocal(\n    x,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype is None:\n        dtype = ivy.as_ivy_dtype(x.dtype)\n    ret = ivy.reciprocal(x, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret.astype(dtype)\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _mod(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n    ret = ivy.remainder(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _modf(\n    x,\n    /,\n    out1_2=(None, None),\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x = ivy.astype(ivy.array(x), ivy.as_ivy_dtype(dtype))\n\n    integral_part = ivy.floor(x)\n    fractional_part = x - integral_part\n\n    if ivy.is_array(where):\n        integral_part = ivy.where(\n            where,\n            integral_part,\n            ivy.default(out, ivy.zeros_like(integral_part)),\n            out=out,\n        )\n        fractional_part = ivy.where(\n            where,\n            fractional_part,\n            ivy.default(out, ivy.zeros_like(fractional_part)),\n            out=out,\n        )\n\n    return fractional_part, integral_part\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _fmod(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n    ret = ivy.fmod(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef _divmod(\n    x1,\n    x2,\n    /,\n    out1_2=(None, None),\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n\n    ret = [ivy.floor_divide(x1, x2, out=out), ivy.remainder(x1, x2, out=out)]\n    if ivy.is_array(where):\n        ret = ivy.where(\n            where,\n            ret,\n            (\n                [\n                    ivy.default(out, ivy.zeros_like(ret[0])),\n                    ivy.default(out, ivy.zeros_like(ret[1])),\n                ]\n            ),\n            out=out,\n        )\n    return ret\n\n\n@handle_numpy_out\n@handle_numpy_dtype\n@to_ivy_arrays_and_back\n@handle_numpy_casting\n@from_zero_dim_arrays_to_scalar\ndef remainder(\n    x1,\n    x2,\n    /,\n    out=None,\n    *,\n    where=True,\n    casting=\"same_kind\",\n    order=\"K\",\n    dtype=None,\n    subok=True,\n):\n    if dtype:\n        x1 = ivy.astype(ivy.array(x1), ivy.as_ivy_dtype(dtype))\n        x2 = ivy.astype(ivy.array(x2), ivy.as_ivy_dtype(dtype))\n    ret = ivy.remainder(x1, x2, out=out)\n    if ivy.is_array(where):\n        ret = ivy.where(where, ret, ivy.default(out, ivy.zeros_like(ret)), out=out)\n    return ret\n", "path": "ivy/functional/frontends/numpy/mathematical_functions/arithmetic_operations.py"}]}