-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix for issue #4180 trirefiner not dealing with fortran contiguous triangles #4184
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
Fix for issue #4180 trirefiner not dealing with fortran contiguous triangles #4184
Conversation
…iguous triangles
+1 from me. Just a quick thought... do we have any similar concerns with the contouring code? If one passes in a fortran ordered image, would the code still work properly? |
…tiguous_triangles Fix for issue #4180 trirefiner not dealing with fortran contiguous triangles
Cherry-picked to master as 2077a46 |
Thanks @ianthomas23 ! |
@WeatherGod: I've checked contouring and it is fine. |
Gah, this breaks the Travis on the python 2.6 build because it uses numpy 1.6 which doesn't support the Do we still support numpy 1.6? If so then we can replace: np.copy(a, order=order) with np.array(a, copy=True, order=order) |
@OceanWolf You are right. This wasn't discovered because we don't test with Numpy 1.6 on the maintenance branch. The changes to Travis that specifically enabled Numpy 1.6 (with Python 2.6) have not been back ported to that branch. I think your solution is fine. AFAIK we would like to continue supporting Numpy 1.6 since it is the default version on a number of Linux distributions |
@OceanWolf Can you put in a PR with that change? Is there any plan on the np side to deprecate the copy kwarg to array? |
Okay, I now see that this got merged into @tacaswell not quite sure how to do this, although the actual code fix looks straight forward enough, it goes against two different branches, I imagine that the I have no idea if numpy has a plan to deprecate the copy kw, when I saw the problem on Travis, I just turned to the docs for 1.6
I would hope numpy don't deprecate this until 1.6 has disappeared from the various distros. |
@OceanWolf Yes in principle the code should be tested on both branches before merging but that requires opening a new PR against the other branch. Back porting the changes to Travis makes sense I don't see anything in the numpy docs about deprecating copy=True so I think that is fine. The easiest is to open a PR with the fix against color-overhaul and we can then cherrypick the change onto master. |
The copy kwarg is fundamental to the array() function; I can't imagine it ever going away. |
One-line fix for issue #4180, plus new test based on OP's report.
Should also be ported to master branch as although master doesn't suffer from the bug, we may as well include the test to ensure it isn't accidentally added in the future.