Conversation
Fixes matplotlib#3998. The issue is that some transfroms sometimes returned masked arrays from `transform_non_affine` (ex Log10transform). The `Path` constructor fills masked arrays to full arrays with `np.nan`, but the `_fast_from_codes_and_verts` does not (as it assumes the verts have been fully validated on the way in). This adds the maskedarray -> np.nan filled array normalization into `transform_path_non_affine`.
|
If this passes, I will do some history re-writing to get rid of both the reversion and re-introduction of @jbmohler 's commit. |
Ensure that transforms that return masked arrays have the arrays filled with nan Improved the code readability.
The docs on Path._fast_from_codes_and_verts said that `codes` can not be None, however the code does not check this and everyplace that `Path` uses `self._codes` it first verifies that the value is not `None` and `None` is a valid value to be passed to the Path `__init__` which falls through with the `_codes` attribute being `None`.
|
attn @pelson I changed some docs in |
|
Seems reasonable. 👍 |
|
Sorry I missed this the first time around. In seeing #4049, I had a slightly different solution: to do the check for masked arrays in |
|
The reason I didn't do the mask checking in the |
Yeah -- I get that. But there's only 3 call sites of that function anyway, and this PR fixed two of them, and the third one it turns out also needs updating. So it's a net wash -- might as well just do it in the function in one place. |
|
Maybe we should rename the method to "sorta_fast"? |
|
Sure thing. |
Re-introduces changes from #3681 and fixes bug.
merge this after #4007Expect this to be currently failing tests