Skip to content

Syntax Sugar for grids. #6

@weinbe58

Description

@weinbe58
obj = grid.new(...)

# sub-grid slices
sub_grid_1: grid.Grid = obj[start:,:stop] 
sub_grid_2: grid.Grid = obj[[1,2,5], start:]
sub_grid_3: grid.Grid = obj[start:, [1,2,5]]
sub_grid_4: grid.Grid = obj[[4], [1,2,5]]

# row/col slices
list_view_x:  grid.Grid = obj[0, start:stop]
list_view_y: grid.Grid  = obj[start:stop, 5]

# scalar
scalar:  grid.Grid  = obj[9, 5]

EDIT: from previous discussion we have decided to keep all the return values be grids.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions