[pypy-commit] pypy default: fix my slice creation in micronumpy

justinpeel noreply at buildbot.pypy.org
Thu Sep 1 03:51:42 CEST 2011


Author: Justin Peel <notmuchtotell at gmail.com>
Branch: 
Changeset: r46965:e31726cdf996
Date: 2011-08-31 19:51 -0600
http://bitbucket.org/pypy/pypy/changeset/e31726cdf996/

Log:	fix my slice creation in micronumpy

diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -3,7 +3,6 @@
 from pypy.interpreter.gateway import interp2app, unwrap_spec
 from pypy.interpreter.typedef import TypeDef, GetSetProperty
 from pypy.module.micronumpy import interp_ufuncs, interp_dtype, signature
-from pypy.objspace.std.sliceobject import W_SliceObject
 from pypy.rlib import jit
 from pypy.rpython.lltypesystem import lltype
 from pypy.tool.sourcetools import func_with_new_name
@@ -248,7 +247,7 @@
                 raise OperationError(space.w_IndexError,
                                      space.wrap("invalid index"))
             if length == 0:
-                w_idx = W_SliceObject(space.wrap(0),
+                w_idx = space.newslice(space.wrap(0),
                                       space.wrap(self.find_size()),
                                       space.wrap(1))
             else:


More information about the pypy-commit mailing list