Skip to content
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

wip: no quick transform, when there is no vertices #1380

Closed

Conversation

guziy
Copy link
Contributor

@guziy guziy commented Oct 8, 2019

Rationale

The tricontourf fails with the dataset I have, because the vertices parameter in quick_vertices_transform is empty.

Implications

Checklist

  • If you have not already done so, ensure you've read and signed the Contributor Licence Agreement (CLA).
    (See the governance page for the CLA and what to do with it).

  • Ensure there is a suitable item in the cartopy test suite for the change you are proposing.

    I am not able to run the tests.

        ImportError while importing test module 
        '../Python/cartopy/lib/cartopy/tests/mpl/test_web_services.py'.
        Hint: make sure your test modules/packages have valid Python names.
       Traceback:
         __init__.py:95: in <module>
        import cartopy.crs
        crs.py:36: in <module>
       from cartopy._crs import (CRS, Geodetic, Globe, PROJ4_VERSION,
     E   ModuleNotFoundError: No module named 'cartopy._crs'
    

@guziy guziy force-pushed the handle_empty_vertices_in_transform branch from f5b2ca5 to bed71b3 Compare January 20, 2020 13:57
@QuLogic
Copy link
Member

QuLogic commented Apr 13, 2020

What is the error that this is fixing?

You will need an editable install of Cartopy in order to run tests.

@guziy
Copy link
Contributor Author

guziy commented Apr 15, 2020

What is the error that this is fixing?

It fixes the IndexError and allows to plot my data. I need to make a test yet for this.

You will need an editable install of Cartopy in order to run tests.

At some point, I was able to run the tests, but now I have to remember how I did it.

@rcomer
Copy link
Member

rcomer commented Oct 28, 2023

These changes look very similar to part of #2213. @guziy are you able to reproduce the problem with Cartopy v0.22? I appreciate that some time has passed, so it’s fair enough if you don’t have the means to check any more!

@guziy guziy force-pushed the handle_empty_vertices_in_transform branch from bed71b3 to 8dceb63 Compare October 29, 2023 20:36
@guziy
Copy link
Contributor Author

guziy commented Oct 29, 2023

Sorry @rcomer, I can't find the test code... I should have posted it....((

I did rebased and pushed, not sure if you have a test for this problem though...

Copy link
Member

@rcomer rcomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking @guziy. Given how similar this change is to part of #2213, I strongly suspect that whatever the problem was is now fixed in the most recent release. So I’m going to close this for now. Please do get back in touch if you have further problems though.

@@ -1250,7 +1250,7 @@ def quick_vertices_transform(self, vertices, src_crs):
if vertices.size == 0:
return vertices

if self == src_crs:
if self == src_crs and len(vertices) > 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the lines 1250-1251, which were added at #2213, I don’t think this check will ever be exercised.

@rcomer rcomer closed this Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants