-
Notifications
You must be signed in to change notification settings - Fork 7
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
Convenience functions for Matrix, Vector and NormalizationParameters #161
Merged
Conversation
This file contains 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
I've added a __len__ method to make it easier to check the length of a vector.
I've added two optional fields to the NormalizationParameters that can be useful.
I've added a user warning that if the matrix has the `std` attribute set it will not be saved.
I've added a test that checks for the warning when trying to save a matrix with the std field. Also minor changes to conform with code style
fzeiser
reviewed
Jan 4, 2021
fzeiser
reviewed
Jan 4, 2021
I've implemented the suggested changes for the `Matrix` class.
The `NormalizationParameters` will now emit warnings if there are inconsistencies between the value of `A` attribute and `mass` field in `spincutPars`.
Very nice. Thanks for the update! |
fzeiser
changed the title
Various changes
Convenience functions for Matrix, Vector and NormalizationParameters
Jan 14, 2021
fzeiser
pushed a commit
that referenced
this pull request
Jan 14, 2021
* optional arguments In #161 some additional parameters were added to `NormalizationParameters`. This caused trouble in `NormalizerGSF`, which assumed that all parameters/attributes in `NormalizationParameters` have to be set. * Sphinx docs: Workaround for documentation of non default members.
fzeiser
pushed a commit
that referenced
this pull request
Jan 14, 2021
* optional arguments In #161 some additional parameters were added to `NormalizationParameters`. This caused trouble in `NormalizerGSF`, which assumed that all parameters/attributes in `NormalizationParameters` have to be set. * Sphinx docs: Workaround for documentation of non default members.
fzeiser
added a commit
that referenced
this pull request
Jan 14, 2021
* optional arguments In #161 some additional parameters were added to `NormalizationParameters`. This caused trouble in `NormalizerGSF`, which assumed that all parameters/attributes in `NormalizationParameters` have to be set. For now, I added a exclude_check_change attribute to mark the real optional arguments. Alternatively NormalizerGSF could be set to look just for some specific parameters it needs. * Sphinx docs: Workaround for documentation of non default members. Necessary due to astropy/sphinx-automodapi#115
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.
I've added two optional fields for the mass and element number to the
NormalizationParameters
, added a__len__
method to theVector
class and added a warning to be issued to the user stating that thestd
attribute of theMatrix
class won't be saved (warn user until issue #142 are fixed).