Skip to content

REGR: ensure oriented_envelope (GEOS<3.12 code path) accepts array-like with ufunc protocol#1939

Merged
jorisvandenbossche merged 2 commits intoshapely:mainfrom
jorisvandenbossche:regr-oriented-envelope-array-like
Feb 12, 2024
Merged

REGR: ensure oriented_envelope (GEOS<3.12 code path) accepts array-like with ufunc protocol#1939
jorisvandenbossche merged 2 commits intoshapely:mainfrom
jorisvandenbossche:regr-oriented-envelope-array-like

Conversation

@jorisvandenbossche
Copy link
Copy Markdown
Member

Closes #1929

In the end I thought to use np.frompyfunc and remove the manual iteration, instead of just fixing that single check for when to use the iteration code path. This ensures that it will work consistently with numpy in what it accepts (the kinds of array likes), and also that it will return the array like objects if those implement the numpy protocols (eg in shapely 2.0.1, calling this function on a geopandas.GeoSeries will also return a GeoSeries)

@jorisvandenbossche
Copy link
Copy Markdown
Member Author

cc @martinfleis

@coveralls
Copy link
Copy Markdown

coveralls commented Nov 26, 2023

Pull Request Test Coverage Report for Build 7873176998

Details

  • 0 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 88.015%

Totals Coverage Status
Change from base Build 7871806220: 0.3%
Covered Lines: 2585
Relevant Lines: 2937

💛 - Coveralls

Copy link
Copy Markdown
Collaborator

@brendan-ward brendan-ward left a comment

Choose a reason for hiding this comment

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

@jorisvandenbossche jorisvandenbossche merged commit a15981f into shapely:main Feb 12, 2024
@jorisvandenbossche jorisvandenbossche deleted the regr-oriented-envelope-array-like branch February 12, 2024 14:32
jorisvandenbossche added a commit to jorisvandenbossche/shapely that referenced this pull request Feb 12, 2024
jorisvandenbossche added a commit that referenced this pull request Feb 16, 2024
@theroggy theroggy added this to the 2.1 milestone Feb 20, 2025
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.

REGR: fallback oriented_envelope does not work with GeoSeries

4 participants