Author: Brian Kearns <[email protected]>
Branch:
Changeset: r69523:a4d49b0849e1
Date: 2014-02-27 11:32 -0500
http://bitbucket.org/pypy/pypy/changeset/a4d49b0849e1/
Log: rename iter to iterators to avoid clash with builtin
diff --git a/pypy/module/micronumpy/concrete.py
b/pypy/module/micronumpy/concrete.py
--- a/pypy/module/micronumpy/concrete.py
+++ b/pypy/module/micronumpy/concrete.py
@@ -5,9 +5,10 @@
from rpython.rlib.rawstorage import alloc_raw_storage, free_raw_storage, \
raw_storage_getitem, raw_storage_setitem, RAW_STORAGE
from rpython.rtyper.lltypesystem import rffi, lltype
-from pypy.module.micronumpy import support, loop, iter
+from pypy.module.micronumpy import support, loop
from pypy.module.micronumpy.base import convert_to_array, W_NDimArray, \
ArrayArgumentException
+from pypy.module.micronumpy.iterators import ArrayIterator, AxisIterator
from pypy.module.micronumpy.strides import (Chunk, Chunks, NewAxisChunk,
RecordChunk, calc_strides, calc_new_strides, shape_agreement,
calculate_broadcast_strides, calculate_dot_strides)
@@ -283,19 +284,19 @@
self.get_backstrides(),
self.get_shape(), shape,
backward_broadcast)
- return iter.ArrayIterator(self, support.product(shape), shape,
- r[0], r[1])
- return iter.ArrayIterator(self, self.get_size(), self.shape,
- self.strides, self.backstrides)
+ return ArrayIterator(self, support.product(shape), shape,
+ r[0], r[1])
+ return ArrayIterator(self, self.get_size(), self.shape,
+ self.strides, self.backstrides)
def create_axis_iter(self, shape, dim, cum):
- return iter.AxisIterator(self, shape, dim, cum)
+ return AxisIterator(self, shape, dim, cum)
def create_dot_iter(self, shape, skip):
r = calculate_dot_strides(self.get_strides(), self.get_backstrides(),
shape, skip)
- return iter.ArrayIterator(self, support.product(shape), shape,
- r[0], r[1])
+ return ArrayIterator(self, support.product(shape), shape,
+ r[0], r[1])
def swapaxes(self, space, orig_arr, axis1, axis2):
shape = self.get_shape()[:]
diff --git a/pypy/module/micronumpy/iter.py
b/pypy/module/micronumpy/iterators.py
rename from pypy/module/micronumpy/iter.py
rename to pypy/module/micronumpy/iterators.py
diff --git a/pypy/module/micronumpy/loop.py b/pypy/module/micronumpy/loop.py
--- a/pypy/module/micronumpy/loop.py
+++ b/pypy/module/micronumpy/loop.py
@@ -8,7 +8,7 @@
from rpython.rtyper.lltypesystem import lltype, rffi
from pypy.module.micronumpy import support, constants as NPY
from pypy.module.micronumpy.base import W_NDimArray
-from pypy.module.micronumpy.iter import PureShapeIterator
+from pypy.module.micronumpy.iterators import PureShapeIterator
call2_driver = jit.JitDriver(name='numpy_call2',
diff --git a/pypy/module/micronumpy/sort.py b/pypy/module/micronumpy/sort.py
--- a/pypy/module/micronumpy/sort.py
+++ b/pypy/module/micronumpy/sort.py
@@ -8,7 +8,7 @@
from rpython.rtyper.lltypesystem import rffi, lltype
from pypy.module.micronumpy import descriptor, types, constants as NPY
from pypy.module.micronumpy.base import W_NDimArray
-from pypy.module.micronumpy.iter import AllButAxisIterator
+from pypy.module.micronumpy.iterators import AllButAxisIterator
INT_SIZE = rffi.sizeof(lltype.Signed)
diff --git a/pypy/module/micronumpy/test/test_iter.py
b/pypy/module/micronumpy/test/test_iterators.py
rename from pypy/module/micronumpy/test/test_iter.py
rename to pypy/module/micronumpy/test/test_iterators.py
--- a/pypy/module/micronumpy/test/test_iter.py
+++ b/pypy/module/micronumpy/test/test_iterators.py
@@ -1,5 +1,5 @@
from pypy.module.micronumpy import support
-from pypy.module.micronumpy.iter import ArrayIterator
+from pypy.module.micronumpy.iterators import ArrayIterator
class MockArray(object):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit