Skip to content

Axis produces underflow and overflow bins unconditionally #5602

Description

@andiwand

Currently Axis produces underflow and overflow bins unconditionally which then propagates to MultiAxis and Grid. For 1D this is not really a problem, one just needs to be careful with the indexing. The underflow bin is bin = 0 and the overflow bin is bin = # bins. While some functions that receive a bin will handle underflow and overflow bins gracefully, others only document that bin needs to be inside the covered range and produce funny output.

In case of AxisBoundaryType::Bound and AxisBoundaryType::Closed, underflow and overflow bins do not exist but will still be indexed as mentioned above.

For MultiAxis this might become a burden as with increasing dimension more and more bins will be underflow and overflow bins. For Grid we allocate a dense storage. In case these bins don't end up used it could be quite wasteful in terms of total memory used and memory bandwidth and cache locality.

Just to provide one example: a multi axis with {1, 2, 3} regular bin vector and a total of 6 regular bins ends up having 60 bins the including underflow and overflow ones.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions