gh-510: Method sigma8_0 failing on repeated calls for HMemu perturbations#535
Open
NastassiaG wants to merge 1 commit into
Open
gh-510: Method sigma8_0 failing on repeated calls for HMemu perturbations#535NastassiaG wants to merge 1 commit into
NastassiaG wants to merge 1 commit into
Conversation
Renaming self.sigma8_0 array to self.sigma8 in the sigma8_0() method for HMemuNonLinearPerturbations; adding the sigma8_0() method for HMemuLinearPerturbations
chiaramoretti
added a commit
that referenced
this pull request
May 16, 2026
Member
|
Hi @NastassiaG, I was unable to reproduce your original reported bug, really. I've been running chains with this implementation for months now. Before we proceed with the review, could you specify a bit more what the issue could potentially be? |
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.
🚀 Pull Request Checklist
✅ Summary
This PR modifies the
self.sigma8_0()method inHMemuNonLinearPerturbationsto avoid failure on repeated calls. It is also adding the same method toHMemuLinearPerturbations, where it is currently missing.🔄 Changes
HMemuNonLinearPerturbations: Renaming the instance attributeself.sigma8_0assigned inside the methodself.sigma8_0()toself.sigma8; this avoids the method being shadowed by an array (causing failure on repeated calls).HMemuLinearPerturbations: Implementing the missingself.sigma8_0()method by reusing the updated implementation from the nonlinear perturbations class.🛠 How to Test
HMemuLinearPerturbationsandHMemuNonLinearPerturbations.sigma8_0()method exists for both instances.See also screenshots below.
📝 Documentation
🏗 Related Issues
Resolves #510
📸 Screenshots (if applicable)
Before implementing changes:
After implementing changes:
✅ PR Checklist for Developers
pre-commit run --all-files✅ PR Checklist for Reviewers
playgroundwill be updated in a corresponding follow-up PRREADME.mdfile