[pypy-commit] pypy numpy-back-to-applevel: remove cruft from type.py
fijal
noreply at buildbot.pypy.org
Fri Jan 27 20:05:48 CET 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: numpy-back-to-applevel
Changeset: r51859:a113c99b0ec2
Date: 2012-01-27 21:05 +0200
http://bitbucket.org/pypy/pypy/changeset/a113c99b0ec2/
Log: remove cruft from type.py
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
@@ -105,9 +105,9 @@
))
def read_bool(self, storage, width, i, offset):
- return self.for_computation(
+ return bool(self.for_computation(
libffi.array_getitem(clibffi.cast_type_to_ffitype(self.T),
- width, storage, i, offset)) != 0
+ width, storage, i, offset)))
def store(self, storage, width, i, offset, box):
value = self.unbox(box)
@@ -182,7 +182,7 @@
return v1 >= v2
def bool(self, v):
- return self.for_computation(self.unbox(v)) != 0
+ return bool(self.for_computation(self.unbox(v)))
@simple_binary_op
def max(self, v1, v2):
@@ -229,8 +229,6 @@
def default_fromstring(self, space):
return self.box(False)
- # XXX check rpythonization
-
@simple_binary_op
def bitwise_and(self, v1, v2):
return v1 & v2
More information about the pypy-commit
mailing list