瀏覽代碼

Fix examples

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64820 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 10 年之前
父節點
當前提交
ce17fc1683
共有 1 個文件被更改,包括 2 次插入2 次删除
  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