-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Adding function for mutable coords #6515
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
Conversation
Thanks! We should also change the error message to mention to set mutable=True then. |
And I think we should make it mutable by default. |
How would you like to make it mutable by default? |
Let's keep it as simple as possible:
There's no need to create another method. Not counting tests this can be a 3-line change! I'm also against changing defaults because of possible shape or performance issues. |
Hey @twiecki @michaelosthege when we use |
sure, it's your PR! |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6515 +/- ##
===========================================
- Coverage 94.74% 69.52% -25.22%
===========================================
Files 146 146
Lines 27807 27810 +3
===========================================
- Hits 26346 19336 -7010
- Misses 1461 8474 +7013
|
What is this PR about?
In this PR , I have made attempts to incorporate suggestions made from 6497.
Coordinate dimensions by default are assumed to be immutable unless they are explicitly mentioned to be mutable in the
add_coord
function.In this PR, we aim to register mutable dimension coordinates with the model without having to explicitly set
mutable = True
in theadd_coord
method for each item incoords
.Checklist
Major / Breaking Changes
New features
add_mutable_coords
which registers new coordinates that are mutable by iterating in afor
loop and callingself.add_coord(..., mutable=True)
for every iteration.Bugfixes
Documentation
Maintenance