-
Notifications
You must be signed in to change notification settings - Fork 3
Repair zero-scaled grids #360
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
Questions:
|
Yes, exactly.
No, |
Thank you @felixhekhorn, for starting this! I added the functionality in commit 5533f4c and the CLI switch in commit 829626d. To finish the PR, do we need a Python wrapper to |
Thanks a lot @felixhekhorn and @cschwan for this! I had a quick look and everything seems fine to me.
I would say it would be good to have this regardless, especially if it turns out that many grids were affected by this issue. One can then have a |
I see you took a quite different approach @cschwan then myself, which is proof again how different people approach problems. I consider that a strength of development, because e.g. in this case your version is much shorter 👍 as for the API: I'm tempted to say, that repair should be an intrinsic part of |
I almost made it part of |
I would also prefer |
done in 1b27a25 (however I failed to come up with a quick unit test) |
LGTM. Merge whenever the tests have finished and you're happy. |
No idea on what the problem is, you did merge master but he still refuses to "rebase and merge" and indeed on the console I had to fix a merge conflict. However, then I could merge this branch cleanly on top of master - see there. Still Github didn't realize this here, so I close this PR any ways ... |
#338 revealed a bug when multiplying a grid with 0 (i.e. default value), which got fixed by 591cdcf . However, this does not fix grids, which got multiplied before before that commit - which still yields problems, see NNPDF/pineko#228 .
The proposed solution is explained here
(I don't think I can do this on my own - I'm not an experienced enough PineAPPL developer myself, but I want to give an incentive for others to jump in 😇 )
I think iterating on all subgrids and call
packed_array::clear_if_empty
might be enough