Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r73879:3245cfc8a14a Date: 2014-10-10 01:14 -0400 http://bitbucket.org/pypy/pypy/changeset/3245cfc8a14a/
Log: some optimizations for arange diff --git a/pypy/module/micronumpy/app_numpy.py b/pypy/module/micronumpy/app_numpy.py --- a/pypy/module/micronumpy/app_numpy.py +++ b/pypy/module/micronumpy/app_numpy.py @@ -16,9 +16,9 @@ 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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit