[GRASS-SVN] r63462 - grass/trunk/lib/python/pygrass/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 9 22:03:20 PST 2014
Author: zarch
Date: 2014-12-09 22:03:20 -0800 (Tue, 09 Dec 2014)
New Revision: 63462
Modified:
grass/trunk/lib/python/pygrass/raster/buffer.py
Log:
pyrass: make buffer.py working under windows (I hope)
Modified: grass/trunk/lib/python/pygrass/raster/buffer.py
===================================================================
--- grass/trunk/lib/python/pygrass/raster/buffer.py 2014-12-09 21:55:38 UTC (rev 63461)
+++ grass/trunk/lib/python/pygrass/raster/buffer.py 2014-12-10 06:03:20 UTC (rev 63462)
@@ -4,8 +4,10 @@
import numpy as np
-CELL = (np.int, np.int0, np.int8, np.int16, np.int32, np.int64)
-FCELL = (np.float, np.float16, np.float32)
+_CELL = ('int', 'int0', 'int8', 'int16', 'int32', 'int64')
+CELL = tuple([getattr(np, attr) for attr in _CELL if hasattr(np, attr)])
+_FCELL = 'float', 'float16', 'float32'
+FCELL = tuple([getattr(np, attr) for attr in _FCELL if hasattr(np, attr)])
_DCELL = 'float64', 'float128'
DCELL = tuple([getattr(np, attr) for attr in _DCELL if hasattr(np, attr)])
More information about the grass-commit
mailing list