[GRASS-SVN] r73877 - grass-addons/grass7/vector/v.class.mlR

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 27 14:16:06 PST 2018


Author: neteler
Date: 2018-12-27 14:16:06 -0800 (Thu, 27 Dec 2018)
New Revision: 73877

Modified:
   grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py
Log:
v.class.mlR addon: fix tab/space indentation mess; tabs are to be avoided, see https://trac.osgeo.org/grass/wiki/Submitting/Python?version=19#Editorsettingsfor4-spaceindentation

Modified: grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py
===================================================================
--- grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py	2018-12-27 22:03:52 UTC (rev 73876)
+++ grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py	2018-12-27 22:16:06 UTC (rev 73877)
@@ -372,9 +372,9 @@
     r_file = open(r_commands, 'w')
 
     if processes > 1:
-	install = install_package % ('doParallel', 'doParallel', 'doParallel')
-	r_file.write(install)
-	r_file.write("\n")
+        install = install_package % ('doParallel', 'doParallel', 'doParallel')
+        r_file.write(install)
+        r_file.write("\n")
 
     # automatic installation of missing R packages
     install = install_package % ('caret', 'caret', 'caret')
@@ -385,8 +385,8 @@
     r_file.write("\n")
     for classifier in classifiers:
         # knn is included in caret
-	if classifier == "knn" or classifier == "knn1":
-	    continue	
+        if classifier == "knn" or classifier == "knn1":
+            continue        
         for package in packages[classifier]:
             install = install_package % (package, package, package)
             r_file.write(install)
@@ -595,8 +595,8 @@
         f.write(header_string)
         f.close()
 
-    	gscript.message("Loading results into attribute table")
-	gscript.run_command('db.in.ogr',
+        gscript.message("Loading results into attribute table")
+        gscript.run_command('db.in.ogr',
                             input_=model_output_csv,
                             output=temptable,
                             overwrite=True,
@@ -609,12 +609,12 @@
         columns = gscript.read_command('db.columns',
                                        table=temptable).splitlines()[1:]
         orig_cat = gscript.vector_db(allfeatures)[int(segments_layer)]['key']
-	gscript.run_command('v.db.join',
+        gscript.run_command('v.db.join',
                             map_=allfeatures,
                             column=orig_cat,
-			    otable=temptable,
+                            otable=temptable,
                             ocolumn='id', 
-			    subset_columns=columns,
+                            subset_columns=columns,
                             quiet=True)
 
     if classified_map:



More information about the grass-commit mailing list