I tried to use the code on the Rasterio-doc website to write an array as a TIFF to disk https://rasterio.readthedocs.io/en/latest/topics/writing.html
with rasterio.Env():
profile = src.profile
profile.update(
dtype=rasterio.uint8,
count=1,
compress='lzw')
with rasterio.open('example.tif', 'w', **profile) as dst:
dst.write(array.astype(rasterio.uint8), 1)
When I run the code the following error occurs: 'name 'array' is not defined'.
I tried in the last line with 'np.array' instead of 'array' to say that it is a numpy-array but it didn't worked.