[GRASS-SVN] r71347 - grass-addons/grass7/raster/r.width.funct
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 9 01:57:30 PDT 2017
Author: madi
Date: 2017-08-09 01:57:30 -0700 (Wed, 09 Aug 2017)
New Revision: 71347
Modified:
grass-addons/grass7/raster/r.width.funct/r.width.funct.py
Log:
specified integer rather than float
Modified: grass-addons/grass7/raster/r.width.funct/r.width.funct.py
===================================================================
--- grass-addons/grass7/raster/r.width.funct/r.width.funct.py 2017-08-08 22:39:46 UTC (rev 71346)
+++ grass-addons/grass7/raster/r.width.funct/r.width.funct.py 2017-08-09 08:57:30 UTC (rev 71347)
@@ -120,7 +120,8 @@
def findint(kl,f):
Xf = np.abs(kl-f); Xf = np.where(Xf==Xf.min())
- z1, z2, f1, f2 = kl[(Xf[0])][0], kl[(Xf[0]-1)][0], kl[(Xf[0])][1], kl[(Xf[0]-1)][1]
+ #z1, z2, f1, f2 = kl[float(Xf[0])][0], kl[float(Xf[0]-1)][0], kl[float(Xf[0])][1], kl[float(Xf[0]-1)][1]
+ z1, z2, f1, f2 = kl[int(Xf[0])][0], kl[int(Xf[0]-1)][0], kl[int(Xf[0])][1], kl[int(Xf[0]-1)][1]
z = z1 + ((z2 - z1) / (f2 - f1)) * (f - f1)
return z
More information about the grass-commit
mailing list