Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r69531:bec36abe6311 Date: 2014-02-27 20:04 -0500 http://bitbucket.org/pypy/pypy/changeset/bec36abe6311/
Log: kill obsolete dot helpers 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 @@ -11,7 +11,7 @@ from pypy.module.micronumpy.iterators import ArrayIter from pypy.module.micronumpy.strides import (Chunk, Chunks, NewAxisChunk, RecordChunk, calc_strides, calc_new_strides, shape_agreement, - calculate_broadcast_strides, calculate_dot_strides) + calculate_broadcast_strides) class BaseConcreteArray(object): @@ -288,11 +288,6 @@ return ArrayIter(self, self.get_size(), self.shape, self.strides, self.backstrides) - def create_dot_iter(self, shape, skip): - r = calculate_dot_strides(self.get_strides(), self.get_backstrides(), - shape, skip) - return ArrayIter(self, support.product(shape), shape, r[0], r[1]) - def swapaxes(self, space, orig_arr, axis1, axis2): shape = self.get_shape()[:] strides = self.get_strides()[:] diff --git a/pypy/module/micronumpy/strides.py b/pypy/module/micronumpy/strides.py --- a/pypy/module/micronumpy/strides.py +++ b/pypy/module/micronumpy/strides.py @@ -421,18 +421,3 @@ n_old_elems_to_use *= old_shape[oldI] assert len(new_strides) == len(new_shape) return new_strides[:] - - -def calculate_dot_strides(strides, backstrides, res_shape, skip_dims): - rstrides = [0] * len(res_shape) - rbackstrides = [0] * len(res_shape) - j = 0 - for i in range(len(res_shape)): - if i in skip_dims: - rstrides[i] = 0 - rbackstrides[i] = 0 - else: - rstrides[i] = strides[j] - rbackstrides[i] = backstrides[j] - j += 1 - return rstrides, rbackstrides _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit