[GRASS-SVN] r62367 - in grass/branches/releasebranch_7_0: . scripts/i.pansharpen
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 23 14:41:38 PDT 2014
Author: neteler
Date: 2014-10-23 14:41:38 -0700 (Thu, 23 Oct 2014)
New Revision: 62367
Modified:
grass/branches/releasebranch_7_0/
grass/branches/releasebranch_7_0/scripts/i.pansharpen/i.pansharpen.py
Log:
i.pansharpen: check for numpy (trunk r61788)
Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
- /grass/trunk:61095,62346,62352,62354,62356,62364
+ /grass/trunk:61095,61788,62346,62352,62354,62356,62364
Modified: grass/branches/releasebranch_7_0/scripts/i.pansharpen/i.pansharpen.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/i.pansharpen/i.pansharpen.py 2014-10-23 20:27:57 UTC (rev 62366)
+++ grass/branches/releasebranch_7_0/scripts/i.pansharpen/i.pansharpen.py 2014-10-23 21:41:38 UTC (rev 62367)
@@ -82,10 +82,19 @@
import sys
import os
-import numpy as np
+
+try:
+ import numpy as np
+ hasNumPy = True
+except ImportError:
+ hasNumPy = False
+
import grass.script as grass
def main():
+ if not hasNumPy:
+ grass.fatal(_("Required dependency NumPy not found. Exiting."))
+
sharpen = options['method'] # sharpening algorithm
ms1 = options['blue'] # blue channel
ms2 = options['green'] # green channel
More information about the grass-commit
mailing list