[GRASS-SVN] r49095 - grass/branches/releasebranch_6_4/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Nov 4 18:05:46 EDT 2011
Author: neteler
Date: 2011-11-04 15:05:46 -0700 (Fri, 04 Nov 2011)
New Revision: 49095
Modified:
grass/branches/releasebranch_6_4/lib/python/array.py
Log:
+code example
Modified: grass/branches/releasebranch_6_4/lib/python/array.py
===================================================================
--- grass/branches/releasebranch_6_4/lib/python/array.py 2011-11-04 19:47:51 UTC (rev 49094)
+++ grass/branches/releasebranch_6_4/lib/python/array.py 2011-11-04 22:05:46 UTC (rev 49095)
@@ -7,8 +7,12 @@
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
More information about the grass-commit
mailing list