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


--- 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/torch/creation_ops.py`
Content:
```
1 # local
2 import ivy
3 from ivy.func_wrapper import with_unsupported_dtypes
4 from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
5 
6 
7 @to_ivy_arrays_and_back
8 def empty(
9     *args,
10     size=None,
11     out=None,
12     dtype=None,
13     layout=None,
14     device=None,
15     requires_grad=False,
16     pin_memory=False,
17     memory_format=None,
18 ):
19     if args and size:
20         raise TypeError("empty() got multiple values for argument 'shape'")
21     if size is None:
22         size = args[0] if isinstance(args[0], (tuple, list)) else args
23     return ivy.empty(shape=size, dtype=dtype, device=device, out=out)
24 
25 
26 @to_ivy_arrays_and_back
27 def full(
28     size,
29     fill_value,
30     *,
31     out=None,
32     dtype=None,
33     layout=None,
34     device=None,
35     requires_grad=None,
36 ):
37     ret = ivy.full(
38         shape=size, fill_value=fill_value, dtype=dtype, device=device, out=out
39     )
40     return ret
41 
42 
43 @to_ivy_arrays_and_back
44 def ones(*args, size=None, out=None, dtype=None, device=None, requires_grad=False):
45     if args and size:
46         raise TypeError("ones() got multiple values for argument 'shape'")
47     if size is None:
48         size = args[0] if isinstance(args[0], (tuple, list)) else args
49     return ivy.ones(shape=size, dtype=dtype, device=device, out=out)
50 
51 
52 @to_ivy_arrays_and_back
53 def ones_like_v_0p3p0_to_0p3p1(input, out=None):
54     return ivy.ones_like(input, out=None)
55 
56 
57 @to_ivy_arrays_and_back
58 def heaviside(input, values, *, out=None):
59     return ivy.heaviside(input, values, out=out)
60 
61 
62 @to_ivy_arrays_and_back
63 def ones_like_v_0p4p0_and_above(
64     input,
65     *,
66     dtype=None,
67     layout=None,
68     device=None,
69     requires_grad=False,
70     memory_format=None,
71 ):
72     ret = ivy.ones_like(input, dtype=dtype, device=device)
73     return ret
74 
75 
76 @to_ivy_arrays_and_back
77 def zeros(*args, size=None, out=None, dtype=None, device=None, requires_grad=False):
78     if args and size:
79         raise TypeError("zeros() got multiple values for argument 'shape'")
80     if size is None:
81         size = args[0] if isinstance(args[0], (tuple, list)) else args
82     return ivy.zeros(shape=size, dtype=dtype, device=device, out=out)
83 
84 
85 @to_ivy_arrays_and_back
86 def zeros_like(
87     input,
88     *,
89     dtype=None,
90     layout=None,
91     device=None,
92     requires_grad=False,
93     memory_format=None,
94 ):
95     ret = ivy.zeros_like(input, dtype=dtype, device=device)
96     return ret
97 
98 
99 @to_ivy_arrays_and_back
100 @with_unsupported_dtypes({"1.11.0 and below": ("float16",)}, "torch")
101 def arange(
102     *args,
103     out=None,
104     dtype=None,
105     layout=None,
106     device=None,
107     requires_grad=False,
108 ):
109     if len(args) == 1:
110         end = args[0]
111         start = 0
112         step = 1
113     elif len(args) == 3:
114         start, end, step = args
115     else:
116         ivy.utils.assertions.check_true(
117             len(args) == 1 or len(args) == 3,
118             "only 1 or 3 positional arguments are supported",
119         )
120     return ivy.arange(start, end, step, dtype=dtype, device=device)
121 
122 
123 @to_ivy_arrays_and_back
124 @with_unsupported_dtypes({"1.11.0 and below": ("float16",)}, "torch")
125 def range(
126     *args,
127     dtype=None,
128     layout=None,
129     device=None,
130     requires_grad=False,
131 ):
132     if len(args) == 1:
133         end = args[0]
134         start = 0
135         step = 1
136     elif len(args) == 3:
137         start, end, step = args
138     else:
139         ivy.utils.assertions.check_true(
140             len(args) == 1 or len(args) == 3,
141             "only 1 or 3 positional arguments are supported",
142         )
143     range_vec = []
144     elem = start
145     while 1:
146         range_vec = range_vec + [elem]
147         elem += step
148         if start == end:
149             break
150         if start < end:
151             if elem > end:
152                 break
153         else:
154             if elem < end:
155                 break
156     return ivy.array(range_vec, dtype=dtype, device=device)
157 
158 
159 @to_ivy_arrays_and_back
160 @with_unsupported_dtypes({"1.11.0 and below": ("float16",)}, "torch")
161 def linspace(
162     start,
163     end,
164     steps,
165     *,
166     out=None,
167     dtype=None,
168     device=None,
169     layout=None,
170     requires_grad=False,
171 ):
172     ret = ivy.linspace(start, end, num=steps, dtype=dtype, device=device, out=out)
173     return ret
174 
175 
176 @to_ivy_arrays_and_back
177 @with_unsupported_dtypes({"1.11.0 and below": ("float16",)}, "torch")
178 def logspace(
179     start,
180     end,
181     steps,
182     *,
183     base=10.0,
184     out=None,
185     dtype=None,
186     layout=None,
187     device=None,
188     requires_grad=False,
189 ):
190     ret = ivy.logspace(
191         start, end, num=steps, base=base, dtype=dtype, device=device, out=out
192     )
193     return ret
194 
195 
196 @to_ivy_arrays_and_back
197 def eye(
198     n, m=None, *, out=None, dtype=None, layout=None, device=None, requires_grad=False
199 ):
200     ret = ivy.eye(n_rows=n, n_columns=m, dtype=dtype, device=device, out=out)
201     return ret
202 
203 
204 @to_ivy_arrays_and_back
205 def from_dlpack(ext_tensor):
206     return ivy.from_dlpack(ext_tensor)
207 
208 
209 @to_ivy_arrays_and_back
210 def empty_like(
211     input,
212     *,
213     dtype=None,
214     layout=None,
215     device=None,
216     requires_grad=False,
217     memory_format=None,
218 ):
219     ret = ivy.empty_like(input, dtype=dtype, device=device)
220     return ret
221 
222 
223 @to_ivy_arrays_and_back
224 def full_like(
225     input,
226     fill_value,
227     *,
228     dtype=None,
229     layout=None,
230     device=None,
231     requires_grad=False,
232     memory_format=None,
233 ):
234     return ivy.full_like(input, fill_value, dtype=dtype, device=device)
235 
236 
237 @to_ivy_arrays_and_back
238 def as_tensor(
239     data,
240     *,
241     dtype=None,
242     device=None,
243 ):
244     return ivy.asarray(data, dtype=dtype, device=device)
245 
246 
247 @to_ivy_arrays_and_back
248 def from_numpy(data, /):
249     return ivy.asarray(data, dtype=ivy.dtype(data))
250 
251 
252 from_numpy.supported_dtypes = ("ndarray",)
253 
254 
255 @to_ivy_arrays_and_back
256 def as_strided(input, size, stride, storage_offset=None):
257     ind = ivy.array([0], dtype=ivy.int64)
258     for i, (size_i, stride_i) in enumerate(zip(size, stride)):
259         r_size = [1] * len(stride)
260         r_size[i] = -1
261         ind = ind + ivy.reshape(ivy.arange(size_i), r_size) * stride_i
262     if storage_offset:
263         ind = ind + storage_offset
264     return ivy.gather(ivy.flatten(input), ind)
265 
266 
267 @to_ivy_arrays_and_back
268 def tensor(
269     data,
270     *,
271     dtype=None,
272     device=None,
273     requires_grad=False,
274     pin_memory=False,
275 ):
276     return ivy.array(data, dtype=dtype, device=device)
277 
278 
279 @to_ivy_arrays_and_back
280 def asarray(
281     obj,
282     *,
283     dtype=None,
284     device=None,
285     copy=None,
286 ):
287     return ivy.asarray(obj, copy=copy, dtype=dtype, device=device)
288
```
--- 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/torch/creation_ops.py b/ivy/functional/frontends/torch/creation_ops.py
--- a/ivy/functional/frontends/torch/creation_ops.py
+++ b/ivy/functional/frontends/torch/creation_ops.py
@@ -285,3 +285,15 @@
     copy=None,
 ):
     return ivy.asarray(obj, copy=copy, dtype=dtype, device=device)
+
+
+@to_ivy_arrays_and_back
+def frombuffer(
+    buffer, 
+    *, 
+    dtype,
+    count=-1,
+    offset=0,
+    requires_grad=False,
+):
+    return ivy.frombuffer(buffer, dtype=dtype, count=count, offset=offset)

{"golden_diff": "diff --git a/ivy/functional/frontends/torch/creation_ops.py b/ivy/functional/frontends/torch/creation_ops.py\n--- a/ivy/functional/frontends/torch/creation_ops.py\n+++ b/ivy/functional/frontends/torch/creation_ops.py\n@@ -285,3 +285,15 @@\n     copy=None,\n ):\n     return ivy.asarray(obj, copy=copy, dtype=dtype, device=device)\n+\n+\n+@to_ivy_arrays_and_back\n+def frombuffer(\n+    buffer, \n+    *, \n+    dtype,\n+    count=-1,\n+    offset=0,\n+    requires_grad=False,\n+):\n+    return ivy.frombuffer(buffer, dtype=dtype, count=count, offset=offset)\n", "issue": "frombuffer\n\n", "before_files": [{"content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\ndef empty(\n    *args,\n    size=None,\n    out=None,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    pin_memory=False,\n    memory_format=None,\n):\n    if args and size:\n        raise TypeError(\"empty() got multiple values for argument 'shape'\")\n    if size is None:\n        size = args[0] if isinstance(args[0], (tuple, list)) else args\n    return ivy.empty(shape=size, dtype=dtype, device=device, out=out)\n\n\n@to_ivy_arrays_and_back\ndef full(\n    size,\n    fill_value,\n    *,\n    out=None,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=None,\n):\n    ret = ivy.full(\n        shape=size, fill_value=fill_value, dtype=dtype, device=device, out=out\n    )\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef ones(*args, size=None, out=None, dtype=None, device=None, requires_grad=False):\n    if args and size:\n        raise TypeError(\"ones() got multiple values for argument 'shape'\")\n    if size is None:\n        size = args[0] if isinstance(args[0], (tuple, list)) else args\n    return ivy.ones(shape=size, dtype=dtype, device=device, out=out)\n\n\n@to_ivy_arrays_and_back\ndef ones_like_v_0p3p0_to_0p3p1(input, out=None):\n    return ivy.ones_like(input, out=None)\n\n\n@to_ivy_arrays_and_back\ndef heaviside(input, values, *, out=None):\n    return ivy.heaviside(input, values, out=out)\n\n\n@to_ivy_arrays_and_back\ndef ones_like_v_0p4p0_and_above(\n    input,\n    *,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    memory_format=None,\n):\n    ret = ivy.ones_like(input, dtype=dtype, device=device)\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef zeros(*args, size=None, out=None, dtype=None, device=None, requires_grad=False):\n    if args and size:\n        raise TypeError(\"zeros() got multiple values for argument 'shape'\")\n    if size is None:\n        size = args[0] if isinstance(args[0], (tuple, list)) else args\n    return ivy.zeros(shape=size, dtype=dtype, device=device, out=out)\n\n\n@to_ivy_arrays_and_back\ndef zeros_like(\n    input,\n    *,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    memory_format=None,\n):\n    ret = ivy.zeros_like(input, dtype=dtype, device=device)\n    return ret\n\n\n@to_ivy_arrays_and_back\n@with_unsupported_dtypes({\"1.11.0 and below\": (\"float16\",)}, \"torch\")\ndef arange(\n    *args,\n    out=None,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n):\n    if len(args) == 1:\n        end = args[0]\n        start = 0\n        step = 1\n    elif len(args) == 3:\n        start, end, step = args\n    else:\n        ivy.utils.assertions.check_true(\n            len(args) == 1 or len(args) == 3,\n            \"only 1 or 3 positional arguments are supported\",\n        )\n    return ivy.arange(start, end, step, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\n@with_unsupported_dtypes({\"1.11.0 and below\": (\"float16\",)}, \"torch\")\ndef range(\n    *args,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n):\n    if len(args) == 1:\n        end = args[0]\n        start = 0\n        step = 1\n    elif len(args) == 3:\n        start, end, step = args\n    else:\n        ivy.utils.assertions.check_true(\n            len(args) == 1 or len(args) == 3,\n            \"only 1 or 3 positional arguments are supported\",\n        )\n    range_vec = []\n    elem = start\n    while 1:\n        range_vec = range_vec + [elem]\n        elem += step\n        if start == end:\n            break\n        if start < end:\n            if elem > end:\n                break\n        else:\n            if elem < end:\n                break\n    return ivy.array(range_vec, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\n@with_unsupported_dtypes({\"1.11.0 and below\": (\"float16\",)}, \"torch\")\ndef linspace(\n    start,\n    end,\n    steps,\n    *,\n    out=None,\n    dtype=None,\n    device=None,\n    layout=None,\n    requires_grad=False,\n):\n    ret = ivy.linspace(start, end, num=steps, dtype=dtype, device=device, out=out)\n    return ret\n\n\n@to_ivy_arrays_and_back\n@with_unsupported_dtypes({\"1.11.0 and below\": (\"float16\",)}, \"torch\")\ndef logspace(\n    start,\n    end,\n    steps,\n    *,\n    base=10.0,\n    out=None,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n):\n    ret = ivy.logspace(\n        start, end, num=steps, base=base, dtype=dtype, device=device, out=out\n    )\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef eye(\n    n, m=None, *, out=None, dtype=None, layout=None, device=None, requires_grad=False\n):\n    ret = ivy.eye(n_rows=n, n_columns=m, dtype=dtype, device=device, out=out)\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef from_dlpack(ext_tensor):\n    return ivy.from_dlpack(ext_tensor)\n\n\n@to_ivy_arrays_and_back\ndef empty_like(\n    input,\n    *,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    memory_format=None,\n):\n    ret = ivy.empty_like(input, dtype=dtype, device=device)\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef full_like(\n    input,\n    fill_value,\n    *,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    memory_format=None,\n):\n    return ivy.full_like(input, fill_value, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\ndef as_tensor(\n    data,\n    *,\n    dtype=None,\n    device=None,\n):\n    return ivy.asarray(data, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\ndef from_numpy(data, /):\n    return ivy.asarray(data, dtype=ivy.dtype(data))\n\n\nfrom_numpy.supported_dtypes = (\"ndarray\",)\n\n\n@to_ivy_arrays_and_back\ndef as_strided(input, size, stride, storage_offset=None):\n    ind = ivy.array([0], dtype=ivy.int64)\n    for i, (size_i, stride_i) in enumerate(zip(size, stride)):\n        r_size = [1] * len(stride)\n        r_size[i] = -1\n        ind = ind + ivy.reshape(ivy.arange(size_i), r_size) * stride_i\n    if storage_offset:\n        ind = ind + storage_offset\n    return ivy.gather(ivy.flatten(input), ind)\n\n\n@to_ivy_arrays_and_back\ndef tensor(\n    data,\n    *,\n    dtype=None,\n    device=None,\n    requires_grad=False,\n    pin_memory=False,\n):\n    return ivy.array(data, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\ndef asarray(\n    obj,\n    *,\n    dtype=None,\n    device=None,\n    copy=None,\n):\n    return ivy.asarray(obj, copy=copy, dtype=dtype, device=device)\n", "path": "ivy/functional/frontends/torch/creation_ops.py"}], "after_files": [{"content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\ndef empty(\n    *args,\n    size=None,\n    out=None,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    pin_memory=False,\n    memory_format=None,\n):\n    if args and size:\n        raise TypeError(\"empty() got multiple values for argument 'shape'\")\n    if size is None:\n        size = args[0] if isinstance(args[0], (tuple, list)) else args\n    return ivy.empty(shape=size, dtype=dtype, device=device, out=out)\n\n\n@to_ivy_arrays_and_back\ndef full(\n    size,\n    fill_value,\n    *,\n    out=None,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=None,\n):\n    ret = ivy.full(\n        shape=size, fill_value=fill_value, dtype=dtype, device=device, out=out\n    )\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef ones(*args, size=None, out=None, dtype=None, device=None, requires_grad=False):\n    if args and size:\n        raise TypeError(\"ones() got multiple values for argument 'shape'\")\n    if size is None:\n        size = args[0] if isinstance(args[0], (tuple, list)) else args\n    return ivy.ones(shape=size, dtype=dtype, device=device, out=out)\n\n\n@to_ivy_arrays_and_back\ndef ones_like_v_0p3p0_to_0p3p1(input, out=None):\n    return ivy.ones_like(input, out=None)\n\n\n@to_ivy_arrays_and_back\ndef heaviside(input, values, *, out=None):\n    return ivy.heaviside(input, values, out=out)\n\n\n@to_ivy_arrays_and_back\ndef ones_like_v_0p4p0_and_above(\n    input,\n    *,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    memory_format=None,\n):\n    ret = ivy.ones_like(input, dtype=dtype, device=device)\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef zeros(*args, size=None, out=None, dtype=None, device=None, requires_grad=False):\n    if args and size:\n        raise TypeError(\"zeros() got multiple values for argument 'shape'\")\n    if size is None:\n        size = args[0] if isinstance(args[0], (tuple, list)) else args\n    return ivy.zeros(shape=size, dtype=dtype, device=device, out=out)\n\n\n@to_ivy_arrays_and_back\ndef zeros_like(\n    input,\n    *,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    memory_format=None,\n):\n    ret = ivy.zeros_like(input, dtype=dtype, device=device)\n    return ret\n\n\n@to_ivy_arrays_and_back\n@with_unsupported_dtypes({\"1.11.0 and below\": (\"float16\",)}, \"torch\")\ndef arange(\n    *args,\n    out=None,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n):\n    if len(args) == 1:\n        end = args[0]\n        start = 0\n        step = 1\n    elif len(args) == 3:\n        start, end, step = args\n    else:\n        ivy.utils.assertions.check_true(\n            len(args) == 1 or len(args) == 3,\n            \"only 1 or 3 positional arguments are supported\",\n        )\n    return ivy.arange(start, end, step, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\n@with_unsupported_dtypes({\"1.11.0 and below\": (\"float16\",)}, \"torch\")\ndef range(\n    *args,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n):\n    if len(args) == 1:\n        end = args[0]\n        start = 0\n        step = 1\n    elif len(args) == 3:\n        start, end, step = args\n    else:\n        ivy.utils.assertions.check_true(\n            len(args) == 1 or len(args) == 3,\n            \"only 1 or 3 positional arguments are supported\",\n        )\n    range_vec = []\n    elem = start\n    while 1:\n        range_vec = range_vec + [elem]\n        elem += step\n        if start == end:\n            break\n        if start < end:\n            if elem > end:\n                break\n        else:\n            if elem < end:\n                break\n    return ivy.array(range_vec, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\n@with_unsupported_dtypes({\"1.11.0 and below\": (\"float16\",)}, \"torch\")\ndef linspace(\n    start,\n    end,\n    steps,\n    *,\n    out=None,\n    dtype=None,\n    device=None,\n    layout=None,\n    requires_grad=False,\n):\n    ret = ivy.linspace(start, end, num=steps, dtype=dtype, device=device, out=out)\n    return ret\n\n\n@to_ivy_arrays_and_back\n@with_unsupported_dtypes({\"1.11.0 and below\": (\"float16\",)}, \"torch\")\ndef logspace(\n    start,\n    end,\n    steps,\n    *,\n    base=10.0,\n    out=None,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n):\n    ret = ivy.logspace(\n        start, end, num=steps, base=base, dtype=dtype, device=device, out=out\n    )\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef eye(\n    n, m=None, *, out=None, dtype=None, layout=None, device=None, requires_grad=False\n):\n    ret = ivy.eye(n_rows=n, n_columns=m, dtype=dtype, device=device, out=out)\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef from_dlpack(ext_tensor):\n    return ivy.from_dlpack(ext_tensor)\n\n\n@to_ivy_arrays_and_back\ndef empty_like(\n    input,\n    *,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    memory_format=None,\n):\n    ret = ivy.empty_like(input, dtype=dtype, device=device)\n    return ret\n\n\n@to_ivy_arrays_and_back\ndef full_like(\n    input,\n    fill_value,\n    *,\n    dtype=None,\n    layout=None,\n    device=None,\n    requires_grad=False,\n    memory_format=None,\n):\n    return ivy.full_like(input, fill_value, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\ndef as_tensor(\n    data,\n    *,\n    dtype=None,\n    device=None,\n):\n    return ivy.asarray(data, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\ndef from_numpy(data, /):\n    return ivy.asarray(data, dtype=ivy.dtype(data))\n\n\nfrom_numpy.supported_dtypes = (\"ndarray\",)\n\n\n@to_ivy_arrays_and_back\ndef as_strided(input, size, stride, storage_offset=None):\n    ind = ivy.array([0], dtype=ivy.int64)\n    for i, (size_i, stride_i) in enumerate(zip(size, stride)):\n        r_size = [1] * len(stride)\n        r_size[i] = -1\n        ind = ind + ivy.reshape(ivy.arange(size_i), r_size) * stride_i\n    if storage_offset:\n        ind = ind + storage_offset\n    return ivy.gather(ivy.flatten(input), ind)\n\n\n@to_ivy_arrays_and_back\ndef tensor(\n    data,\n    *,\n    dtype=None,\n    device=None,\n    requires_grad=False,\n    pin_memory=False,\n):\n    return ivy.array(data, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\ndef asarray(\n    obj,\n    *,\n    dtype=None,\n    device=None,\n    copy=None,\n):\n    return ivy.asarray(obj, copy=copy, dtype=dtype, device=device)\n\n\n@to_ivy_arrays_and_back\ndef frombuffer(\n    buffer, \n    *, \n    dtype,\n    count=-1,\n    offset=0,\n    requires_grad=False,\n):\n    return ivy.frombuffer(buffer, dtype=dtype, count=count, offset=offset)\n", "path": "ivy/functional/frontends/torch/creation_ops.py"}]}