[GRASS-SVN] r64832 - grass/branches/releasebranch_7_0/lib/python/script

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 10 07:53:31 PDT 2015


Author: annakrat
Date: 2015-03-10 07:53:31 -0700 (Tue, 10 Mar 2015)
New Revision: 64832

Modified:
   grass/branches/releasebranch_7_0/lib/python/script/array.py
Log:
script.array: make it into real doctest (merge from trunk, r64831)

Modified: grass/branches/releasebranch_7_0/lib/python/script/array.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/script/array.py	2015-03-10 14:49:46 UTC (rev 64831)
+++ grass/branches/releasebranch_7_0/lib/python/script/array.py	2015-03-10 14:53:31 UTC (rev 64832)
@@ -29,7 +29,6 @@
 >>> # This will write the numpy array as GRASS raster map
 ... # with name map2d_1
 ... map2d_1.write(mapname="map2d_1", overwrite=True)
- 100%
 0
 >>>
 >>> # We create a new array and read map2d_1 to modify it
@@ -47,7 +46,6 @@
  [ 0.  1.  2.  0.  1.  2.]]
 >>> # Write the result as new raster map with name map2d_2
 ... map2d_2.write(mapname="map2d_2", overwrite=True)
- 100%
 0
 >>>
 >>> # Here we create a 3D raster map numpy array
@@ -67,10 +65,12 @@
   [  1.   2.   3.   4.   5.   6.]
   [  2.   3.   4.   5.   6.   7.]
   [  3.   4.   5.   6.   7.   8.]]
+<BLANKLINE> 
  [[  1.   2.   3.   4.   5.   6.]
   [  2.   3.   4.   5.   6.   7.]
   [  3.   4.   5.   6.   7.   8.]
   [  4.   5.   6.   7.   8.   9.]]
+<BLANKLINE> 
  [[  2.   3.   4.   5.   6.   7.]
   [  3.   4.   5.   6.   7.   8.]
   [  4.   5.   6.   7.   8.   9.]
@@ -78,8 +78,6 @@
 >>> # This will write the numpy array as GRASS 3D raster map
 ... # with name map3d_1
 ... map3d_1.write(mapname="map3d_1", overwrite=True)
-Loading floating point data with 8 bytes ... (6x4x3)
- 100%
 0
 >>> # We create a new 3D array and read map3d_1 to modify it
 ... map3d_2 = garray.array3d()
@@ -94,18 +92,18 @@
   [ 1.  2.  0.  1.  2.  0.]
   [ 2.  0.  1.  2.  0.  1.]
   [ 0.  1.  2.  0.  1.  2.]]
+<BLANKLINE> 
  [[ 1.  2.  0.  1.  2.  0.]
   [ 2.  0.  1.  2.  0.  1.]
   [ 0.  1.  2.  0.  1.  2.]
   [ 1.  2.  0.  1.  2.  0.]]
+<BLANKLINE> 
  [[ 2.  0.  1.  2.  0.  1.]
   [ 0.  1.  2.  0.  1.  2.]
   [ 1.  2.  0.  1.  2.  0.]
   [ 2.  0.  1.  2.  0.  1.]]]
 >>> # Write the result as new 3D raster map with name map3d_2
 ... map3d_2.write(mapname="map3d_2", overwrite=True)
-Loading floating point data with 8 bytes ... (6x4x3)
- 100%
 0
 
 (C) 2010-2012 by Glynn Clements and the GRASS Development Team



More information about the grass-commit mailing list