[GRASS-SVN] r64820 - grass/trunk/lib/python/script

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 8 23:45:34 PDT 2015


Author: glynn
Date: 2015-03-08 23:45:34 -0700 (Sun, 08 Mar 2015)
New Revision: 64820

Modified:
   grass/trunk/lib/python/script/array.py
Log:
Fix examples


Modified: grass/trunk/lib/python/script/array.py
===================================================================
--- grass/trunk/lib/python/script/array.py	2015-03-09 06:30:11 UTC (rev 64819)
+++ grass/trunk/lib/python/script/array.py	2015-03-09 06:45:34 UTC (rev 64820)
@@ -18,7 +18,7 @@
 >>> # Write some data
 ... for y in range(map2d_1.shape[0]):
 ...     for x in range(map2d_1.shape[1]):
-...         map2d_1[y][x] = y + x
+...         map2d_1[y,x] = y + x
 ...
 >>> # Lets have a look at the array
 ... print map2d_1
@@ -59,7 +59,7 @@
 ... for z in range(map3d_1.shape[0]):
 ...     for y in range(map3d_1.shape[1]):
 ...         for x in range(map3d_1.shape[2]):
-...             map3d_1[z][y][x] = z + y + x
+...             map3d_1[z,y,x] = z + y + x
 ...
 >>> # Lets have a look at the 3D array
 ... print map3d_1



More information about the grass-commit mailing list