title: How to limit decimals when adjusting a raster array with rasterio
body: <p>I have multiple raster images. Currently all the cells have a value which is a count of something. I would like to have this as a percentage. I did this with the following code:</p>
  <p>This works fine, but it creates a lot of decimals for some values (33.33333333). Because I'm working with big rasters this greatly increases file size. I do not have need for a lot of decimals, so how do I limit them?</p>
  <pre><code>import rasterio as rio
  
  def Percentage(path_in, granule):
      path_out = os.path.join(certain_path, granule + &quot;.jp2&quot;)
  
      for granule in glob.glob(r&quot;path_to_rasters\*&quot;):
      
          with rio.open(path_in) as src:
              # Read as numpy array
              array = src.read()
              profile = src.profile
              array = (array / count) * 100
              
          with rio.open(path_out, 'w', **profile) as dst:
              # Write to disk
              dst.write(array)
  </code></pre>