Author: Alex Gaynor <alex.gay...@gmail.com> Branch: numpy-ufunc-object Changeset: r46926:d1eda06d3a34 Date: 2011-08-30 14:55 -0400 http://bitbucket.org/pypy/pypy/changeset/d1eda06d3a34/
Log: translation fixes. diff --git a/pypy/module/micronumpy/interp_ufuncs.py b/pypy/module/micronumpy/interp_ufuncs.py --- a/pypy/module/micronumpy/interp_ufuncs.py +++ b/pypy/module/micronumpy/interp_ufuncs.py @@ -13,6 +13,8 @@ ) class W_Ufunc(Wrappable): + _attrs_ = ["name", "promote_to_float", "promote_bools", "identity"] + def __init__(self, name, promote_to_float, promote_bools, identity): self.name = name self.promote_to_float = promote_to_float @@ -43,6 +45,7 @@ if self.identity is None: raise OperationError(space.w_NotImplementedError, space.wrap("%s is missing its identity value" % self.name)) + assert isinstance(self, W_Ufunc2) obj = convert_to_array(space, w_obj) if isinstance(obj, Scalar): raise OperationError(space.w_TypeError, space.wrap("cannot reduce on a scalar")) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit