[pypy-commit] pypy object-dtype: Add missing space

rguillebert noreply at buildbot.pypy.org
Wed Jan 28 15:31:22 CET 2015


Author: Romain Guillebert <romain.py at gmail.com>
Branch: object-dtype
Changeset: r75558:eaa0525725fa
Date: 2015-01-28 15:30 +0100
http://bitbucket.org/pypy/pypy/changeset/eaa0525725fa/

Log:	Add missing space

diff --git a/pypy/module/micronumpy/boxes.py b/pypy/module/micronumpy/boxes.py
--- a/pypy/module/micronumpy/boxes.py
+++ b/pypy/module/micronumpy/boxes.py
@@ -326,7 +326,7 @@
         if not space.is_none(w_out):
             raise OperationError(space.w_NotImplementedError, space.wrap(
                 "out not supported"))
-        return self.get_dtype(space).itemtype.round(self, decimals)
+        return self.get_dtype(space).itemtype.round(space, self, decimals)
 
     def descr_astype(self, space, w_dtype):
         from pypy.module.micronumpy.descriptor import W_Dtype
diff --git a/pypy/module/micronumpy/loop.py b/pypy/module/micronumpy/loop.py
--- a/pypy/module/micronumpy/loop.py
+++ b/pypy/module/micronumpy/loop.py
@@ -684,7 +684,7 @@
     while not arr_iter.done(arr_state):
         round_driver.jit_merge_point(shapelen=shapelen, dtype=dtype)
         w_v = arr_iter.getitem(arr_state).convert_to(space, dtype)
-        w_v = dtype.itemtype.round(w_v, decimals)
+        w_v = dtype.itemtype.round(space, w_v, decimals)
         out_iter.setitem(out_state, w_v)
         arr_state = arr_iter.next(arr_state)
         out_state = out_iter.next(out_state)
diff --git a/pypy/module/micronumpy/ndarray.py b/pypy/module/micronumpy/ndarray.py
--- a/pypy/module/micronumpy/ndarray.py
+++ b/pypy/module/micronumpy/ndarray.py
@@ -113,7 +113,7 @@
         if arr.get_size() > self.get_size():
             raise OperationError(space.w_ValueError, space.wrap(
                 "index out of range for array"))
-        size = loop.count_all_true(arr)
+        size = loop.count_all_true(space, arr)
         if arr.ndims() == 1:
             res_shape = [size] + self.get_shape()[1:]
         else:
@@ -129,7 +129,7 @@
         if idx.get_size() > self.get_size():
             raise OperationError(space.w_ValueError, space.wrap(
                 "index out of range for array"))
-        size = loop.count_all_true(idx)
+        size = loop.count_all_true(space, idx)
         if size > val.get_size() and val.get_size() != 1:
             raise oefmt(space.w_ValueError,
                         "NumPy boolean array indexing assignment "
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
@@ -397,7 +397,7 @@
         return 0
 
     @specialize.argtype(1)
-    def round(self, v, decimals=0):
+    def round(self, space, v, decimals=0):
         if decimals != 0:
             return v
         return Float64().box(self.unbox(v))
@@ -525,7 +525,7 @@
         return self.box(ans)
 
     @specialize.argtype(1)
-    def round(self, v, decimals=0):
+    def round(self, space, v, decimals=0):
         raw = self.for_computation(self.unbox(v))
         if decimals < 0:
             # No ** in rpython
@@ -752,7 +752,7 @@
         return math.ceil(v)
 
     @specialize.argtype(1)
-    def round(self, v, decimals=0):
+    def round(self, space, v, decimals=0):
         raw = self.for_computation(self.unbox(v))
         if rfloat.isinf(raw):
             return v


More information about the pypy-commit mailing list