Skip to content
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

Raster astype() converts the nodata by default even if type is the same #627

Open
rhugonnet opened this issue Nov 15, 2024 · 0 comments
Open

Comments

@rhugonnet
Copy link
Contributor

We previously discussed having a convert_nodata option to Raster.astype() to ensure nodata is supported, and avoid problems when writing etc..., which is now the default:

def astype(

However, if the type is the same, astype will still update the nodata value, which is not intuitive (made me look for a bug in tests for an 1h when running raster_equal(). Should we skip convert_nodata in the case where astype() is the same as the existing type, and (potentially) raise a warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant