We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
since flowline.section = new_section works, it is natural to want to try something like: flowline.section[88] = 0 and expect it to work.
flowline.section = new_section
flowline.section[88] = 0
The command above will silently do nothing.
Is there a way to prevent this in python by raising an error? The relevant code is here:
oggm/oggm/core/flowline.py
Lines 185 to 187 in a63521c
I really don't know if there is a simple way to check for this...
Thanks @drounce for the report
The text was updated successfully, but these errors were encountered:
Correction: the relevant code is here:
Lines 181 to 187 in a63521c
So the problem in this line:
Is that it's the getter which is called and then the returned array is indexed at 88 and then changed.
I think there is no way to prevent this to happen, and it seems to be a perfect example where "too much fancy" is sometimes not good...
Sorry, something went wrong.
No branches or pull requests
since
flowline.section = new_section
works, it is natural to want to try something like:flowline.section[88] = 0
and expect it to work.The command above will silently do nothing.
Is there a way to prevent this in python by raising an error? The relevant code is here:
oggm/oggm/core/flowline.py
Lines 185 to 187 in a63521c
I really don't know if there is a simple way to check for this...
Thanks @drounce for the report
The text was updated successfully, but these errors were encountered: