[pypy-commit] pypy numpy-ufunc-object: translation fixes.
alex_gaynor
noreply at buildbot.pypy.org
Tue Aug 30 20:55:14 CEST 2011
Author: Alex Gaynor <alex.gaynor at 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"))
More information about the pypy-commit
mailing list