]> gerrit.simantics Code Review - simantics/python.git/blobdiff - org.simantics.pythonlink/test/org/simantics/pythonlink/test/scripts/Python.sts
Some fixes to Python integration.
[simantics/python.git] / org.simantics.pythonlink / test / org / simantics / pythonlink / test / scripts / Python.sts
index 409d9b2001e6d8a9061260ea3b3e1267278ce4ed..7464d73ceae34d742dd269620c2bd230ef6b67cd 100644 (file)
@@ -29,10 +29,10 @@ vector [1, 2, 3, 4, 10]
 > ndarray (vector [1, 2, 3])\r
 ndarray(3) [1.0, 2.0, 3.0]\r
 > ndarrayM 2 2 (vector [1, 2, 3, 4])\r
-ndarray(2x2) [1.0, 2.0, 3.0, 4.0]\r
+ndarray(2x2) [[1.0, 2.0], [3.0, 4.0]]\r
 > a = ndarrayN (vector [2, 2, 3]) (vector [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])\r
 > a\r
-ndarray(2x2x3) [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, ...]\r
+ndarray(2x2x3) [[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], [[7.0, 8.0, 9.0], [10.0, 11.0, 12.0]]]\r
 > ndarrayDims a\r
 vector [2, 2, 3]\r
 > ndarrayValues a\r
@@ -45,4 +45,4 @@ vector [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0]
 >     setPythonNDArrayVariable "foo" (ndarrayM 2 3 (vector [1, 2, 3,  4, 5, 6]))\r
 >     executePythonStatement "bar = foo.cumsum(1)"\r
 >     getPythonNDArrayVariable "bar"\r
-ndarray(2x3) [1.0, 3.0, 6.0, 4.0, 9.0, 15.0]\r
+ndarray(2x3) [[1.0, 3.0, 6.0], [4.0, 9.0, 15.0]]\r