Selaa lähdekoodia

Fix examples in script.array, merge from trunk https://trac.osgeo.org/grass/changeset/64820

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@64829 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 vuotta sitten
vanhempi
commit
5a8443f24e
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      lib/python/script/array.py

+ 2 - 2
lib/python/script/array.py

@@ -18,7 +18,7 @@ Usage:
 >>> # 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 @@ Usage:
 ... 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