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

ENH: implement __repr__ for the index #65

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

martinfleis
Copy link
Member

It now shows a nice repr like this instead of a memory location

In [7]: pop1960.xindexes["county"]
Out[7]: 
GeometryIndex(
    [<POLYGON ((-95.343 48.547, -95.341 48.715, -95.094 48.717, -95.095 48.912, -...>
     <POLYGON ((-118.851 47.95, -118.847 48.478, -118.869 48.479, -118.87 48.647,...>
     <POLYGON ((-117.438 48.044, -117.541 48.043, -117.536 47.79, -117.607 47.798...>
     <POLYGON ((-118.971 47.939, -118.973 47.96, -118.953 47.989, -118.953 48.02,...>
     ...
     <POLYGON ((-107.195 34.584, -107.718 34.584, -108.227 34.583, -109.048 34.59...>
     <POLYGON ((-76.396 37.108, -76.403 37.091, -76.434 37.089, -76.464 37.103, -...>
     <POLYGON ((-77.532 38.565, -77.721 38.84, -77.707 38.877, -77.678 38.885, -7...>
     <POLYGON ((-111.372 44.745, -111.368 45.35, -111.349 45.349, -111.349 45.635...>],
    crs=EPSG:4326)

@martinfleis martinfleis merged commit 2e55fbb into xarray-contrib:main Apr 22, 2024
9 checks passed
@martinfleis martinfleis deleted the repr branch April 22, 2024 18:53
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.

1 participant