Author: mattip Branch: matrixmath-dot Changeset: r51620:0125f74ace80 Date: 2012-01-22 01:17 +0200 http://bitbucket.org/pypy/pypy/changeset/0125f74ace80/
Log: fix bad test diff --git a/pypy/module/micronumpy/dot.py b/pypy/module/micronumpy/dot.py --- a/pypy/module/micronumpy/dot.py +++ b/pypy/module/micronumpy/dot.py @@ -70,7 +70,6 @@ broadcast_shape, right_skip) righti = ViewIterator(right.start, _r[0], _r[1], broadcast_shape) while not outi.done(): - ''' dot_driver.jit_merge_point(left=left, right=right, shape_len=shape_len, @@ -81,18 +80,14 @@ dtype=dtype, sig=None, #For get_printable_location ) - ''' lval = left.getitem(lefti.offset).convert_to(dtype) rval = right.getitem(righti.offset).convert_to(dtype) outval = result.getitem(outi.offset).convert_to(dtype) v = dtype.itemtype.mul(lval, rval) value = dtype.itemtype.add(v, outval) #Do I need to convert it to result.dtype or does settiem do that? - assert outi.offset < result.size result.setitem(outi.offset, value) outi = outi.next(shape_len) righti = righti.next(shape_len) lefti = lefti.next(shape_len) - assert lefti.done() - assert righti.done() return result diff --git a/pypy/module/micronumpy/test/test_numarray.py b/pypy/module/micronumpy/test/test_numarray.py --- a/pypy/module/micronumpy/test/test_numarray.py +++ b/pypy/module/micronumpy/test/test_numarray.py @@ -891,7 +891,7 @@ assert (c == [[[14, 38, 62], [38, 126, 214], [62, 214, 366]], [[86, 302, 518], [110, 390, 670], [134, 478, 822]]]).all() c = dot(a, b[:, 2]) - assert (c == [[38, 126, 214], [302, 390, 478]]).all() + assert (c == [[62, 214, 366], [518, 670, 822]]).all() def test_dot_constant(self): from _numpypy import array diff --git a/pypy/module/micronumpy/test/test_zjit.py b/pypy/module/micronumpy/test/test_zjit.py --- a/pypy/module/micronumpy/test/test_zjit.py +++ b/pypy/module/micronumpy/test/test_zjit.py @@ -379,7 +379,17 @@ def test_dot(self): result = self.run("dot") assert result == 184 - self.check_simple_loop({}) + self.check_simple_loop({{'arraylen_gc': 9, + 'float_add': 1, + 'float_mul': 1, + 'getinteriorfield_raw': 3, + 'guard_false': 3, + 'guard_true': 3, + 'int_add': 6, + 'int_lt': 6, + 'int_sub': 3, + 'jump': 1, + 'setinteriorfield_raw': 1}}) class TestNumpyOld(LLJitMixin): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit