Author: Romain Guillebert <romain...@gmail.com> Branch: Changeset: r64541:b98e6b4ac4ef Date: 2013-05-24 17:10 +0200 http://bitbucket.org/pypy/pypy/changeset/b98e6b4ac4ef/
Log: Remove dead code diff --git a/pypy/module/micronumpy/test/test_dtypes.py b/pypy/module/micronumpy/test/test_dtypes.py --- a/pypy/module/micronumpy/test/test_dtypes.py +++ b/pypy/module/micronumpy/test/test_dtypes.py @@ -275,7 +275,7 @@ from numpypy import array, dtype from cPickle import loads, dumps a = array([1,2,3]) - if self.ptr_size == 8: + if self.ptr_size == 8: assert a.dtype.__reduce__() == (dtype, ('i8', 0, 1), (3, '<', None, None, None, -1, -1, 0)) else: assert a.dtype.__reduce__() == (dtype, ('i4', 0, 1), (3, '<', None, None, None, -1, -1, 0)) diff --git a/pypy/module/micronumpy/types.py b/pypy/module/micronumpy/types.py --- a/pypy/module/micronumpy/types.py +++ b/pypy/module/micronumpy/types.py @@ -1704,25 +1704,6 @@ T = lltype.Char def _coerce(self, space, arr, ofs, dtype, w_items, shape): - items_w = space.fixedview(w_items) - for i in range(len(items_w)): - subdtype = dtype.subdtype - itemtype = subdtype.itemtype - if space.len_w(shape) <= 1: - w_box = itemtype.coerce(space, dtype.subdtype, items_w[i]) - itemtype.store(arr, 0, ofs, w_box) - ofs += itemtype.get_element_size() - else: - size = 1 - for dimension in shape[1:]: - size *= dimension - size *= itemtype.get_element_size() - for w_item in items_w: - self._coerce(space, arr, ofs, dtype, w_items, shape[1:]) - ofs += size - return arr - - def _coerce(self, space, arr, ofs, dtype, w_items, shape): # TODO: Make sure the shape and the array match items_w = space.fixedview(w_items) subdtype = dtype.subdtype _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit