-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compute_shape_availability
triggers numpy failure: Python integer 255 out of bounds for int8
#363
Comments
After digging around, I confirmed that the issue is an unpinned |
Line 378 in 16c02fd
Could you try setting this to int16? That might solve it. (anyway I observed a potential performance regression with numpy 2 and we should pin the version for now) |
@fneum did the test, |
Picked this one up again to tackle There was actually no problem per se with The file in question reads as import rasterio
rasterio.open("U2018_CLC2018_V2020_20u1.tif").read(1)
The The correct (and recommended way) to add this raster to the exclusion container is with the correct "nodata" value of the dataset, which is -128: from atlite.gis import ExclusionContainer
excluder = ExclusionContainer(crs=3035)
excluder.add_raster("U2018_CLC2018_V2020_20u1.tif", codes=range(20), nodata=-128) |
Version Checks (indicate both or one)
I have confirmed this bug exists on the lastest release of Atlite.
I have confirmed this bug exists on the current
master
branch of Atlite.Issue Description
While trying to reproduce the land availability example, the following error is returned.
It seems like this is caused by a depreciated functionality in
numpy
: numpy/numpy#26596Either
numpy
or something else needs to be pinned in the environment, maybe?Reproducible Example
Expected Behavior
Reproducing the example should be possible.
Notes: the
.tif
was downloaded from the CORINE website.Installed Versions
0.2.13
The text was updated successfully, but these errors were encountered: