[pypy-commit] pypy default: fix a crash and translation in micronumpy
alex_gaynor
noreply at buildbot.pypy.org
Sun Nov 6 21:14:58 CET 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r48852:9e7c5b33e755
Date: 2011-11-06 15:14 -0500
http://bitbucket.org/pypy/pypy/changeset/9e7c5b33e755/
Log: fix a crash and translation 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
@@ -202,7 +202,7 @@
return space.newtuple([self.descr_len(space)])
def descr_get_size(self, space):
- return space.wrap(self.size)
+ return space.wrap(self.find_size())
def descr_copy(self, space):
return space.call_function(space.gettypefor(BaseArray), self, self.find_dtype())
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
@@ -21,7 +21,9 @@
from numpy import array
# XXX fixed on multidim branch
#assert array(3).size == 1
- assert array([1, 2, 3]).size == 3
+ a = array([1, 2, 3])
+ assert a.size == 3
+ assert (a + a).size == 3
def test_empty(self):
"""
More information about the pypy-commit
mailing list