stevenpawley / Pyspatialml

Machine learning modelling for spatial data
GNU General Public License v3.0
145 stars 29 forks source link

Multiplication operator between raster and constant #46

Open Jeongho-Han opened 2 years ago

Jeongho-Han commented 2 years ago

Hi @stevenpawley, I really appreciate this nice library. I found multiplication between rasters works. but is there any way to multiply a raster (RasterLayer object) by a constant? Because I got a raster predicted by the machine learning model that I trained, but I need to multiply that raster by a scale factor.

for example, type(ras1): pyspatialml.rasterlayer.RasterLayer ras2 = ras1 * 0.25