-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Revert "Use atleast_3d instead of ensure_3d" #5241
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
Conversation
This reverts commit 2f5a633. numpy.atleast_3d does not convert an empty array properly.
proposed fix for issue #5185 |
Cc: @jkseppan, as the author of the original commit. |
The doc failure is fixed on 1.5.x, will merge over now. I am still unclear on why this results in the intermittent failure and I could not reproduce this in linux. |
I'm fine with this going in, but it sounds odd that this would fix an intermittent failure. Is the use of |
@jkseppan Reading uninitialized data sounds like the only explanation I can think of. Unfortunately I don't have any experience with running valgrind or such on python extensions |
EDIT: Sorry, missed your explanation in #5185. Still puzzling, though. |
I believe it is due to out-of-bound memory access which is causing this random behavior. I tried to give some more insight in #5185 on what is happening in the path c++ extension code where it goes bad. |
Superceded by #5274. @cimarronm: Thanks for all your help identifying the issue! |
mathtext creates Python dictionaries for the charmap and inverse charmap for each font. This turns out to be unnecessary: 1) freetype has an API to do a charmap lookup that is faster than a Python dictionary 2) The inverse charmap isn't really necessary if we convert the latex_to_bakoma to use unicode character points rather than glyph indices. This should have a large impact when matplotlib#5241 is merged with larger fonts.
mathtext creates Python dictionaries for the charmap and inverse charmap for each font. This turns out to be unnecessary: 1) freetype has an API to do a charmap lookup that is faster than a Python dictionary 2) The inverse charmap isn't really necessary if we convert the latex_to_bakoma to use unicode character points rather than glyph indices. This should have a large impact when matplotlib#5241 is merged with larger fonts.
mathtext creates Python dictionaries for the charmap and inverse charmap for each font. This turns out to be unnecessary: 1) freetype has an API to do a charmap lookup that is faster than a Python dictionary 2) The inverse charmap isn't really necessary if we convert the latex_to_bakoma to use unicode character points rather than glyph indices. This should have a large impact when matplotlib#5241 is merged with larger fonts.
mathtext creates Python dictionaries for the charmap and inverse charmap for each font. This turns out to be unnecessary: 1) freetype has an API to do a charmap lookup that is faster than a Python dictionary 2) The inverse charmap isn't really necessary if we convert the latex_to_bakoma to use unicode character points rather than glyph indices. This should have a large impact when matplotlib#5241 is merged with larger fonts.
mathtext creates Python dictionaries for the charmap and inverse charmap for each font. This turns out to be unnecessary: 1) freetype has an API to do a charmap lookup that is faster than a Python dictionary 2) The inverse charmap isn't really necessary if we convert the latex_to_bakoma to use unicode character points rather than glyph indices. This should have a large impact when matplotlib#5241 is merged with larger fonts.
This reverts commit 2f5a633.
numpy.atleast_3d does not convert an empty array properly.