[GRASS-SVN] r73075 - grass-addons/grass7/raster/r.learn.ml

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 11 13:59:36 PDT 2018


Author: neteler
Date: 2018-08-11 13:59:36 -0700 (Sat, 11 Aug 2018)
New Revision: 73075

Modified:
   grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
Log:
r.learn.ml addon: write raster history to output map

Modified: grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py
===================================================================
--- grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py	2018-08-11 13:10:34 UTC (rev 73074)
+++ grass-addons/grass7/raster/r.learn.ml/r.learn.ml.py	2018-08-11 20:59:36 UTC (rev 73075)
@@ -923,6 +923,7 @@
     if predict_type == 'raw':
         numpy2raster(array=prediction, mtype=ftype, rastname=output,
                      overwrite=True)
+        gs.raster_history(output)
 
     # writing of predicted results for probabilities
     if predict_type == 'prob':
@@ -944,6 +945,7 @@
             rastername = output + '_' + str(label)
             numpy2raster(array=prediction[:, :, pred_index], mtype='FCELL',
                          rastname=rastername, overwrite=overwrite)
+            gs.raster_history(output)
 
 
 def __predict_parallel2(estimator, predictors, predict_type, current, row_min, row_max):



More information about the grass-commit mailing list