Skip to content

NumPy Style indexing for IList. #599

@weinbe58

Description

@weinbe58

Because we do not support list comprehension certain kinds of operations that invole non-uniform slicing of an IList can be very verbose. It would be nice if we could index an IList with an integer IList:

@structural
def main():
    a = ilist.range(100)
    return [a[0], a[1], a[4], a[7], a[10], a[55]]

could be written as:

@structural
def main():
    a = ilist.range(100)
    return a[[0, 1, 4, 7, 10, 55]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: This is a feature request, i.e: not implemented / a PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions