Provide a way to reinitialize the parameter values of a model#16812
Merged
nden merged 4 commits intoastropy:mainfrom Aug 13, 2024
Merged
Provide a way to reinitialize the parameter values of a model#16812nden merged 4 commits intoastropy:mainfrom
nden merged 4 commits intoastropy:mainfrom
Conversation
…ter values, including optionally changing their shape
Contributor
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
Member
Author
|
@nden - as you requested on Slack, I have now made the method private, and as a result I have removed the changelog entry. However, I have kept the tests as I think they are good to have and we may one day make this method public. |
Contributor
|
The precommit check is required but in this case I think it reformats a file. Can this be ignored? @pllim |
Member
Author
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Member
Author
|
@nden should be fixed now! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This provides a (simple) public method to reinitialize parameters in a model either to default values, or to specific values in the same way as through the model initializer. For example:
This is an alternative to #16806 and #16710
Closes #16806
Closes #16710
Closes #16593