[pypy-commit] pypy numpy-unify-methods: flesh out Bool
mattip
noreply at buildbot.pypy.org
Wed Feb 13 23:05:29 CET 2013
Author: mattip <matti.picus at gmail.com>
Branch: numpy-unify-methods
Changeset: r61222:a7610da341a2
Date: 2013-02-14 00:00 +0200
http://bitbucket.org/pypy/pypy/changeset/a7610da341a2/
Log: flesh out Bool
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
@@ -376,6 +376,20 @@
def invert(self, v):
return ~v
+ @raw_unary_op
+ def isfinite(self, v):
+ return True
+
+ @raw_unary_op
+ def signbit(self, v):
+ return False
+
+ @simple_unary_op
+ def reciprocal(self, v):
+ if v:
+ return 1
+ return 0
+
NonNativeBool = Bool
class Integer(Primitive):
More information about the pypy-commit
mailing list