ソースを参照

+code example

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49097 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 13 年 前
コミット
14496c4405
1 ファイル変更6 行追加2 行削除
  1. 6 2
      lib/python/array.py

+ 6 - 2
lib/python/array.py

@@ -7,8 +7,12 @@ Functions to use GRASS rasters with NumPy.
 Usage:
 
 @code
-from grass.script import array as garray
-...
+    map = 'elevation'
+    x = garray.array()
+    x.read(map)
+    # calculate something on array
+    x[...] = x / 50.
+    x.write(map + ".new")
 @endcode
 
 (C) 2010-2011 by Glynn Clements and the GRASS Development Team