If the denominator becomes 0 or pass > total, the corresponding bin is skipped.
While an efficiency does not indeed make sense when the denominator is zero, silently skipping those bins is extremely error-prone. Why not raising an exception (thinking about PyROOT) or at least returning a flag?
These changes, if performed, must be carefully documented as it might break user code that was previously “working”. That said, @moneta or @couet might provide more useful information on this.
If the denominator becomes 0 or pass > total, the corresponding bin is skipped.
It is true that, in the code, the protections against dividing by 0 are done without printing a waning. My guess is that too many warnings might be generated if a such message is printed. Documenting a bit more precisely might help. We can also have a logic which print the warning only once. I let @moneta decide what is the best.
Hi,
I agree with could have the logic to print such a warning the first time the denominator histogram has a bin with zero content. Having an exception as said before will likely break too much existing code. It can be quite common to have empty bins in the histograms.