[pypy-issue] [issue943] pypy 1.7 the pow operation of numpypy's array is not correct

Armin Rigo tracker at bugs.pypy.org
Mon Nov 28 17:25:31 CET 2011

Armin Rigo <armin.rigo at gmail.com> added the comment:

Another bug, maybe related:

>>>> numpypy.divide(numpypy.array([-10]),numpypy.array([2]))
array([9223372036854775803], dtype=int64)

This is caused by the decorator "@binop" applied to the function div() in a
mixin class, ArithmeticTypeMixin.  As decorators often do, it ends up with two
functions: impl()->div().  But when the mixin is applied (several times), we
duplicate the impl() function, but of course not the div() function...  So we
end up with only one copy of div(), which gets its arguments generalized to the
"Unsigned" type...

Bivab and me found this because in the disable_merge_different_int_types branch,
annotation cleanly fails instead.

nosy: +arigo
status: unread -> chatting

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list