1. Pypy
  2. Untitled project
  3. pypy

Commits

Romain Guillebert  committed 23c18ab

Merge default

  • Participants
  • Parent commits b52f6e5
  • Branches numpy-pickle

Comments (0)

Files changed (1)

File pypy/module/micronumpy/interp_boxes.py

View file
     def __repr__(self):
         return '%s(%s)' % (self.__class__.__name__, self.value)
 
+    def descr_reduce(self, space):
+        numpypy = space.getbuiltinmodule("_numpypy")
+        assert isinstance(numpypy, MixedModule)
+        multiarray = numpypy.get("multiarray")
+        assert isinstance(multiarray, MixedModule)
+        scalar = multiarray.get("scalar")
+
+        return space.newtuple([scalar, space.wrap(self._get_dtype())])
+
 class ComplexBox(object):
     _mixin_ = True