Open tpvasconcelos opened 4 weeks ago
@tpvasconcelos oops, I skipped the math classes 🥺 :rofl: . Please, give me some tips (without giving me the final answer) how could I debug to solve this bug.
Hey @sstephanyy I updated the description to give a bit more context, but it's completely okay if you still think that the context is not enough to go out and try to debug the issue.
In short, the error is being raised in the _interpolate_row_index
, _interpolate_trace_index
(etc) functions because we did not account for the edge cases where either the number of traces is only 1 or the number of traces per row is only 1. Resulting in things like ((ctx.n_rows - 1) - ith_row) / (ctx.n_rows - 1)
raising the ZeroDivisionError
exception
If you are interested in giving it at try, you could consider taking a look at TDD as a methodology to help arrive at the solution faster. i.e.,
ZeroDivisionError
exceptionIf you are interested in giving it at try, you could consider taking a look at TDD as a methodology to help arrive at the solution faster. i.e.,
1. Define some tests cases that should work. These will currently fail and raise the `ZeroDivisionError` exception 2. Debug the issue and make the necessary changes until all tests pass (including all existing tests) 3. Once all tests are green, refactor the code until you're happy with the final result (making sure that the tests never stop passing) 4. Done!
Thanks so much @tpvasconcelos . I'll give it a try :smiley: . It may take a few days for me to get into a solution, because I am still slow developing and debugging code :fearful:
All index-based colormodes raise a
ZeroDivisionError
when plotting a ridgeline plot with either a single trace or a single trace per row.The index-based colormodes are:
MVE: