Author: mattip <[email protected]>
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):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit