Author: mattip <[email protected]>
Branch: missing-ndarray-attributes
Changeset: r59931:69e846f17fae
Date: 2013-01-10 21:48 +0200
http://bitbucket.org/pypy/pypy/changeset/69e846f17fae/
Log: fix merge problems
diff --git a/pypy/module/micronumpy/arrayimpl/concrete.py
b/pypy/module/micronumpy/arrayimpl/concrete.py
--- a/pypy/module/micronumpy/arrayimpl/concrete.py
+++ b/pypy/module/micronumpy/arrayimpl/concrete.py
@@ -78,9 +78,9 @@
if self.dtype.is_complex_type():
dtype = self.dtype.float_type
return SliceArray(self.start, strides, backstrides,
- self.get_shape(), self, dtype=dtype)
+ self.get_shape(), self, self, dtype=dtype)
return SliceArray(self.start, strides, backstrides,
- self.get_shape(), self)
+ self.get_shape(), self, self)
def get_imag(self):
strides = self.get_strides()
@@ -88,11 +88,11 @@
if self.dtype.is_complex_type():
dtype = self.dtype.float_type
return SliceArray(self.start + dtype.get_size(), strides,
- backstrides, self.get_shape(), self, dtype=dtype)
+ backstrides, self.get_shape(), self, self, dtype=dtype)
if self.dtype.is_flexible_type():
# numpy returns self for self.imag
return SliceArray(self.start, strides, backstrides,
- self.get_shape(), self)
+ self.get_shape(), self, self)
impl = NonWritableArray(self.get_shape(), self.dtype, self.order,
strides,
backstrides)
impl.fill(self.dtype.box(0))
@@ -320,7 +320,7 @@
return None
class NonWritableArray(ConcreteArray):
- def descr_setitem(self, space, w_index, w_value):
+ def descr_setitem(self, space, orig_array, w_index, w_value):
raise OperationError(space.w_RuntimeError, space.wrap(
"array is not writable"))
diff --git a/pypy/module/micronumpy/test/test_numarray.py
b/pypy/module/micronumpy/test/test_numarray.py
--- a/pypy/module/micronumpy/test/test_numarray.py
+++ b/pypy/module/micronumpy/test/test_numarray.py
@@ -2448,8 +2448,8 @@
assert a.shape == ()
def test_flexible_repr(self):
- # import overrides str(), repr() for array
- from _numpypy import array
+ # numpypy overrides _numpypy repr with pure python one
+ from numpypy import array
a = array(['abc'],'S3')
s = repr(a)
# simplify test for \n in repr
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit