1 | | In my case, I accidently created a large array shape=(3,3), while I have (1,1). However, excess elements should be set to no data since I set nodata as -9999.0. ds.GetRasterBand(1).SetNoDataValue(-9999.0). Because this is a temperature raster array, 0 has meaning as 0 C while no data has no meaning. |
| 1 | In my case, I accidently created a large array shape=(3,3), while I have (1,1). However, excess elements should be set to no data since I set nodata as -9999.0. ds.GetRasterBand(1).SetNoDataValue(-9999.0). Because this is a temperature raster array, 0 has a meaning of 0 Celcius while no data has no meaning. |