Skip to content

Conversation

@sgillies
Copy link

Good morning! I saw this notebook referenced by a rasterio user and saw a usage correction that should be made. Code like out_profile = dataset.profile.copy() is better written as out_profile = dataset.profile. Modifying out_profile never modifies the dataset itself and never has.

I'm not sure how this usage spread, it's never been necessary to do this. The meta and profile attributes of a dataset are already copies of what is in the dataset. Modifying them does not modify the dataset.
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

Successfully merging this pull request may close these issues.

1 participant