Author: Matti Picus <[email protected]>
Branch: ndarray-subtype
Changeset: r65351:72758565e385
Date: 2013-07-11 18:47 +0300
http://bitbucket.org/pypy/pypy/changeset/72758565e385/
Log: fix ztranslation, break zjit and compile
diff --git a/pypy/module/micronumpy/base.py b/pypy/module/micronumpy/base.py
--- a/pypy/module/micronumpy/base.py
+++ b/pypy/module/micronumpy/base.py
@@ -16,7 +16,7 @@
else:
w_ret = space.allocate_instance(W_NDimArray, w_cls)
W_NDimArray.__init__(w_ret, impl)
- space.call_method(w_ret, space.wrap('__array_finalize__'), w_instance)
+ space.call_method(w_ret, '__array_finalize__', w_instance)
return w_ret
class ArrayArgumentException(Exception):
@@ -45,8 +45,7 @@
w_ret = space.allocate_instance(W_NDimArray, space.type(w_subtype))
W_NDimArray.__init__(w_ret, impl)
assert isinstance(w_ret, W_NDimArray)
- space.call_function(space.getattr(w_ret,
- space.wrap('__array_finalize__')), w_subtype)
+ space.call_method(w_ret, '__array_finalize__', w_subtype)
return w_ret
return W_NDimArray(impl)
@@ -65,8 +64,7 @@
if w_subtype:
w_ret = space.allocate_instance(W_NDimArray, w_subtype)
W_NDimArray.__init__(w_ret, impl)
- space.call_function(space.getattr(w_ret,
- space.wrap('__array_finalize__')), w_subtype)
+ space.call_method(w_ret, '__array_finalize__', w_subtype)
return w_ret
return W_NDimArray(impl)
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
@@ -630,7 +630,6 @@
"trace not implemented yet"))
def descr_view(self, space, w_dtype=None, w_type=None) :
- print w_dtype, w_type
if not w_type and w_dtype:
try:
if space.is_true(space.issubtype(w_dtype,
space.gettypefor(W_NDimArray))):
@@ -1150,7 +1149,7 @@
shape = _find_shape(space, w_shape, dtype)
if not shape:
return W_NDimArray.new_scalar(space, dtype, space.wrap(0))
- return W_NDimArray.from_shape(space, shape, dtype=dtype, order=order)
+ return space.wrap(W_NDimArray.from_shape(space, shape, dtype=dtype,
order=order))
@unwrap_spec(order=str)
def ones(space, w_shape, w_dtype=None, order='C'):
@@ -1163,7 +1162,7 @@
w_arr = W_NDimArray.from_shape(space, shape, dtype=dtype, order=order)
one = dtype.box(1)
w_arr.fill(one)
- return w_arr
+ return space.wrap(w_arr)
def _reconstruct(space, w_subtype, w_shape, w_dtype):
return descr_new_array(space, w_subtype, w_shape, w_dtype)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit