1. Pypy
  2. Untitled project
  3. pypy

Commits

mattip  committed a7610da

flesh out Bool

  • Participants
  • Parent commits 5af3b14
  • Branches numpy-unify-methods

Comments (0)

Files changed (1)

File pypy/module/micronumpy/types.py

View file
     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):