You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to plot some data using matplotlib sub-figures (About 64 graphs total), and also plot a tri-bin shading using the log scaling and a gridsize of 4. All of my graphs work except one. I keep getting an error: IndexError: boolean index did not match indexed array along axis 0; size of axis is 16 but size of corresponding boolean axis is 17
When I trace the error, it is comming from this line of code:
In this snippet, the good_idxs boolean mask used to filter/keep the correct indices has one more entry than it should, causing a mismatch. In my use-case, I am able to trace the extra index item back to this line:
indices=tribin_helpers.ternary_to_serial(gridsize, it, il, ir) +1
When I lookup the function however, I cant seem to make heads or tails of how the ternary -> serial conversion works under the hood (Spesifically the i0, i and shift parameters). This error seems like an edge-case that has something to do with assigning tri-bin polygon indices to each data-point, and appears to be unique to this dataset. Could you help me understand this chunk of code so I could maybe try and diagnose the issue further?
I am attempting to plot some data using matplotlib sub-figures (About 64 graphs total), and also plot a tri-bin shading using the log scaling and a gridsize of 4. All of my graphs work except one. I keep getting an error:
IndexError: boolean index did not match indexed array along axis 0; size of axis is 16 but size of corresponding boolean axis is 17
When I trace the error, it is comming from this line of code:
mpltern/mpltern/ternary/_axes.py
Line 718 in d2cc1be
In this snippet, the
good_idxs
boolean mask used to filter/keep the correct indices has one more entry than it should, causing a mismatch. In my use-case, I am able to trace the extra index item back to this line:mpltern/mpltern/ternary/_axes.py
Line 693 in d2cc1be
When I lookup the function however, I cant seem to make heads or tails of how the ternary -> serial conversion works under the hood (Spesifically the
i0
,i
andshift
parameters). This error seems like an edge-case that has something to do with assigning tri-bin polygon indices to each data-point, and appears to be unique to this dataset. Could you help me understand this chunk of code so I could maybe try and diagnose the issue further?mpltern/mpltern/tribin_helpers.py
Lines 34 to 82 in d2cc1be
The text was updated successfully, but these errors were encountered: