Переглянути джерело

pyrass: make buffer.py working under windows (I hope)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63462 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 10 роки тому
батько
коміт
ca6a62c42c
1 змінених файлів з 4 додано та 2 видалено
  1. 4 2
      lib/python/pygrass/raster/buffer.py

+ 4 - 2
lib/python/pygrass/raster/buffer.py

@@ -4,8 +4,10 @@ import ctypes
 import numpy as np
 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 = 'float64', 'float128'
 DCELL = tuple([getattr(np, attr) for attr in _DCELL if hasattr(np, attr)])
 DCELL = tuple([getattr(np, attr) for attr in _DCELL if hasattr(np, attr)])