Commits

Maciej Fijalkowski committed 45ad739

remove an obscure parameter

Comments (0)

Files changed (2)

pypy/module/micronumpy/interp_numarray.py

 class ToStringArray(Call1):
     def __init__(self, child):
         dtype = child.find_dtype()
-        self.itemsize = dtype.itemtype.get_element_size()
-        self.s = StringBuilder(child.size * self.itemsize)
+        itemsize = dtype.itemtype.get_element_size()
+        self.s = StringBuilder(child.size * itemsize)
         Call1.__init__(self, None, 'tostring', child.shape, dtype, dtype,
                        child)
         self.res = W_NDimArray([1], dtype, 'C')

pypy/module/micronumpy/signature.py

         assert isinstance(arr, ToStringArray)
         arr.res.setitem(0, self.child.eval(frame, arr.values).convert_to(
             self.dtype))
-        for i in range(arr.itemsize):
+        for i in range(self.dtype.get_size()):
             arr.s.append(arr.res_casted[i])
 
 class BroadcastLeft(Call2):