[pypy-commit] pypy numpy-multidim: creation from sequences

fijal noreply at buildbot.pypy.org
Thu Oct 27 19:41:58 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: numpy-multidim
Changeset: r48532:57661ae58454
Date: 2011-10-27 19:40 +0200
http://bitbucket.org/pypy/pypy/changeset/57661ae58454/

Log:	creation from sequences

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
@@ -680,6 +680,12 @@
         a[1] = [1, 2, 3, 4]
         assert a[1, 2] == 3
         raises(TypeError, a[1].__setitem__, [1, 2, 3])
+        a = numpy.array([[1, 2], [3, 4]])
+        assert a == [[1, 2], [3, 4]]
+        a[1] = numpy.array([5, 6])
+        assert a == [[1, 2], [5, 6]]
+        a[:,1] = numpy.array([8, 10])
+        assert a == [[1, 8], [5, 10]]
 
 class AppTestSupport(object):
     def setup_class(cls):


More information about the pypy-commit mailing list