Author: Alex Gaynor <[email protected]>
Branch: numpy-back-to-applevel
Changeset: r51864:6ab531465c38
Date: 2012-01-27 14:16 -0500
http://bitbucket.org/pypy/pypy/changeset/6ab531465c38/
Log: merged upstream
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
@@ -1453,7 +1453,6 @@
from _numpypy import arange
assert (arange(3).ravel() == arange(3)).all()
assert (arange(6).reshape(2, 3).ravel() == arange(6)).all()
- print arange(6).reshape(2, 3).T.ravel()
assert (arange(6).reshape(2, 3).T.ravel() == [0, 3, 1, 4, 2, 5]).all()
def test_take(self):
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
@@ -105,9 +105,9 @@
))
def read_bool(self, storage, width, i, offset):
- return self.for_computation(
+ return bool(self.for_computation(
libffi.array_getitem(clibffi.cast_type_to_ffitype(self.T),
- width, storage, i, offset)) != 0
+ width, storage, i, offset)))
def store(self, storage, width, i, offset, box):
value = self.unbox(box)
@@ -182,7 +182,7 @@
return v1 >= v2
def bool(self, v):
- return self.for_computation(self.unbox(v)) != 0
+ return bool(self.for_computation(self.unbox(v)))
@simple_binary_op
def max(self, v1, v2):
@@ -229,8 +229,6 @@
def default_fromstring(self, space):
return self.box(False)
- # XXX check rpythonization
-
@simple_binary_op
def bitwise_and(self, v1, v2):
return v1 & v2
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit