Skip to content

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

Closed
guziy wants to merge 1 commit into
SciTools:mainfrom
guziy:handle_empty_vertices_in_transform
Closed

wip: no quick transform, when there is no vertices#1380
guziy wants to merge 1 commit into
SciTools:mainfrom
guziy:handle_empty_vertices_in_transform

Conversation

@guziy

@guziy guziy commented Oct 8, 2019

Copy link
Copy Markdown
Contributor

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

QuLogic commented Apr 13, 2020

Copy link
Copy Markdown
Member

What is the error that this is fixing?

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

@guziy

guziy commented Apr 15, 2020

Copy link
Copy Markdown
Contributor Author

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

rcomer commented Oct 28, 2023

Copy link
Copy Markdown
Member

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

guziy commented Oct 29, 2023

Copy link
Copy Markdown
Contributor Author

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...

@rcomer rcomer left a comment

Copy link
Copy Markdown
Member

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.

Comment thread lib/cartopy/crs.py
return vertices

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

Copy link
Copy Markdown
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