Skip to content

Dict-like interface isn't looking good! #102

@buriy

Description

@buriy

first_batch = x[{"batch": 1}]
three_examples = x[{"batch": slice(1, 4)}]

It doesn't look well, no IDE hints, and constructs a new dict every time.

Would you consider pandas-like interface instead?
x[x.batch==1] and x[x.batch>=1 && x.batch<4] syntax looks much better and allows for IDE hints.
x.batch[1] and x.batch[1:4] also can be used for this specific case -- that would be amazing!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions