[pypy-commit] pypy default: make zjit tests not fail for subarrays (they now skip like before)
mattip
noreply at buildbot.pypy.org
Sun May 26 23:17:32 CEST 2013
Author: mattip <matti.picus at gmail.com>
Branch:
Changeset: r64574:a3b2d7c354c6
Date: 2013-05-27 00:16 +0300
http://bitbucket.org/pypy/pypy/changeset/a3b2d7c354c6/
Log: make zjit tests not fail for subarrays (they now skip like before)
diff --git a/pypy/module/micronumpy/interp_boxes.py b/pypy/module/micronumpy/interp_boxes.py
--- a/pypy/module/micronumpy/interp_boxes.py
+++ b/pypy/module/micronumpy/interp_boxes.py
@@ -254,6 +254,8 @@
descr__new__, _get_dtype = new_dtype_getter("float64")
class W_FlexibleBox(W_GenericBox):
+ _attrs_ = ['ofs', 'dtype', 'arr']
+ _immutable_fields_ = ['ofs']
def __init__(self, arr, ofs, dtype):
self.arr = arr # we have to keep array alive
self.ofs = ofs
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
@@ -1705,8 +1705,10 @@
def _coerce(self, space, arr, ofs, dtype, w_items, shape):
# TODO: Make sure the shape and the array match
+ from interp_dtype import W_Dtype
items_w = space.fixedview(w_items)
subdtype = dtype.subdtype
+ assert isinstance(subdtype, W_Dtype)
itemtype = subdtype.itemtype
if len(shape) <= 1:
for i in range(len(items_w)):
More information about the pypy-commit
mailing list