Skip to content

Smarter UHI in slices #485

Description

@henryiii

Axis proxy objects passed to the UHI locators will gain _slice_ and _slice_index_ properties that allow a UHI locator to detect the context of use. They will be optional from the locator's point of view - existing locators will continue to work.

This will allow locators to detect which part of a slice they are in, allowing much more powerful locators to be written by users.

We will use this new power to fix bh.overflow as an endpoint of a slice.

@HDembinski, on the matter of modifying bh.loc to avoid flow bins - You were in favor of it not hiding flow bins in slices either, @jpivarski was neutral, and I was in favor of it avoiding flow bins in slices. I'm willing to concede that now; it's easier to understand it as "the index at this point" if it uniformly includes flow bins in both cases, and matches Boost.Histogram better. As long as we have the ability to write a smart locator, I'm okay with the default one being straightforward but possibly exposing flow bins. For most users, I'm hoping they will leave of the end point for inclusive of flow, and use 0 / len for cutting flow bins off, not relying on bh.loc at the edges.

I do think a smart, range inclusive locator that does not include flow would be quite useful, and might be introduced in hist one day. But I do think that's not bh.loc / hist.loc.

Originally posted by @henryiii in #479 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions