Change cast from float 64

This commit is contained in:
Florent Guiotte 2018-09-12 20:28:08 +02:00
parent 39dcc1e615
commit 4d307df976

View File

@ -46,14 +46,14 @@ class Triskele:
return read(self.outfile)
def _write_infile(self, rasters, dtype):
## Scale to new dtype
rep = np.iinfo(dtype)
## Expand if rasters is 2D
if len(rasters.shape) < 3:
rasters = np.expand_dims(rasters, 2)
rasters = rasters.astype(np.float32)
## Scale to new dtype
rep = np.iinfo(dtype)
rasters = rasters.astype(np.float64)
## Channel independant scale
for i in range(rasters.shape[2]):