This instance will be upgraded to Heptapod 0.27.1 on 2021-12-02 at 15:00 UTC+1 (a few minutes of down time)

Commit 6d153b47 authored by Brian Kearns's avatar Brian Kearns
Browse files

some optimizations for arange

parent aab89610d3d8
......@@ -16,9 +16,9 @@ def arange(start, stop=None, step=1, dtype=None):
dtype = test.dtype
length = math.ceil((float(stop) - start) / step)
length = int(length)
arr = _numpypy.multiarray.zeros(length, dtype=dtype)
arr = _numpypy.multiarray.empty(length, dtype=dtype)
i = start
for j in range(arr.size):
for j in xrange(arr.size):
arr[j] = i
i += step
return arr
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment