-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add merge to Python API #247
Conversation
Plus some blackification
Is |
Not sure about what do you mean, but consider that:
|
Are we missing something else then a unit test here? or why is this draft mode? |
A test would be nice, but I'm also OK merging it if someone tests it and reports success. |
I was waiting to write the test, that's why is still draft :) |
@cschwan I added a stub of the test for I didn't dig too much myself, but if you could take a look, maybe you could guess immediately what I'm doing wrong. Moreover, the test is pretty basic, since I'm just counting the number of bins (assuming that |
I think you have non-overlapping bin limits, try changing the limits of the second grid. |
I tried to change, but it is still not working: I expect to add new bins into the merged grid, but I always find the same ones. Unfortunately, there is little documentation about Lines 866 to 875 in c756b4c
So, if this becomes very relevant, I will dig into the code. But remaining at a superficial level (without exploring PineAPPL itself), I'm not able to tell if there is a bug in the (minimal) Python layer, or I'm misunderstanding |
That seems to be the first problem:
If I read this error message properly, than the parameter
Are you missing the |
Thanks for the help, but unfortunately you're looking at the wrong example (not sure why that one, i.e. The one I'm now developing is failing here:
|
Actually, I even know where is the problem you were looking: it is now taking the default value, i.e. |
Actually, the two problems were somehow connected: fixing ones I've been able to fix the other. However, the bins should be either consecutive (and so non-overlapping) or coinciding (inferred by trials), but this behavior is documented only by the errors I got. In any case: if you have no better test in mind, I'm ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy about this, let's merge it!
Since
Grid
is nowClone
, we can deprecatePyGrid::merge_from_file
from the Python API and replace with justPyGrid::merge
.