[pypy-commit] pypy default: Create W_Dtype.read_bool()

rlamy noreply at buildbot.pypy.org
Sun Jun 7 06:08:11 CEST 2015


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: 
Changeset: r77936:bcb81b2d92aa
Date: 2015-06-07 04:53 +0100
http://bitbucket.org/pypy/pypy/changeset/bcb81b2d92aa/

Log:	Create W_Dtype.read_bool()

diff --git a/pypy/module/micronumpy/concrete.py b/pypy/module/micronumpy/concrete.py
--- a/pypy/module/micronumpy/concrete.py
+++ b/pypy/module/micronumpy/concrete.py
@@ -46,7 +46,7 @@
         return self.dtype.read(self, index, 0)
 
     def getitem_bool(self, index):
-        return self.dtype.itemtype.read_bool(self, index, 0)
+        return self.dtype.read_bool(self, index, 0)
 
     def setitem(self, index, value):
         self.dtype.store(self, index, 0, value)
diff --git a/pypy/module/micronumpy/descriptor.py b/pypy/module/micronumpy/descriptor.py
--- a/pypy/module/micronumpy/descriptor.py
+++ b/pypy/module/micronumpy/descriptor.py
@@ -408,6 +408,9 @@
     def read(self, arr, i, offset):
         return self.itemtype.read(arr, i, offset, self)
 
+    def read_bool(self, arr, i, offset):
+        return self.itemtype.read_bool(arr, i, offset, self)
+
     def descr_reduce(self, space):
         w_class = space.type(self)
         builder_args = space.newtuple([


More information about the pypy-commit mailing list