Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[ENH]: Rename Bbox.from_extents / Bbox.extents to "corners" #26805

Copy link
Copy link
Open
@anntzer

Description

@anntzer
Issue body actions

Problem

I always find it difficult when working on internals to remember which of Bbox.extents and Bbox.bounds is (x0, y0), (x1, y1) and which is x0, y0, w, h (perhaps there's a clear mnemonic as to why one should be called extents and one should be called bounds, but I never found it :/)
A possible improvement would be to rename extents ((x0, y0), (x1, y1)) to "corners", as that seems to be a more transparent name (at least to me...); I can't think of a less ambiguous name for bounds, but if we slowly get rid of "extents" in the codebase, bounds will just remain as "the one that's not "corners"".
(We can also debate whether that's an opportunity to have Bbox.corners return the structured ((x0, y0), (x1, y1)) whereas Bbox.extents currently returns the unstructured (x0, y0, x1, y1), but that's a secondary question.)

Note that unlike #22515 this doesn't really address the confusion that exists at the level of user-facing APIs; this issue is mostly about what we use internally.

Proposed solution

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.