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

Allow passing len-1 array for x and y coordinates in Point(..) (compat with 1.8) #1590

Merged
merged 2 commits into from Oct 29, 2022

Conversation

jorisvandenbossche
Copy link
Member

Closes #1587

@coveralls
Copy link

coveralls commented Oct 28, 2022

Pull Request Test Coverage Report for Build 3350480088

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 8 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 84.655%

Files with Coverage Reduction New Missed Lines %
shapely/geometry/linestring.py 2 92.16%
shapely/geometry/base.py 6 82.31%
Totals Coverage Status
Change from base Build 3343354302: 0.02%
Covered Lines: 2157
Relevant Lines: 2548

💛 - Coveralls

@jorisvandenbossche jorisvandenbossche merged commit bef2c9c into shapely:main Oct 29, 2022
@jorisvandenbossche jorisvandenbossche deleted the point-1d-array branch October 29, 2022 07:29
@martinfleis
Copy link
Contributor

I think that this has introduced a regression geopandas CI is now picking - https://github.com/geopandas/geopandas/actions/runs/3351235289/jobs/5552549617

@martinfleis
Copy link
Contributor

GeoPandas CI fails on this

Point([(2, 3), (11, 4), (7, 2), (8, 9), (1, 13)])

Which I'd say is a correct behaviour. I don't really understand what is the intention of this line. Shapely 1.8 creates POINT (2 3) but I'd say that raising ValueError: Invalid values passed to Point constructor, which is the behaviour of 2.0b2 is correct. But it should be noted, that it is a change of behaviour.

@jorisvandenbossche
Copy link
Member Author

@martinfleis thanks for the note. I am also unsure why this behaviour existed that way, and I think it is a good change. But a change indeed, so will add it to the release notes.

@jorisvandenbossche
Copy link
Member Author

-> #1600

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.

Point no longer accepts arrays of shape (1,)
3 participants