Skip to content

Range.__getitem__ returns bad result for out-of-bound slices instead of empty array #1137

@gdementen

Description

@gdementen
>>> wb = la.open_excel()
>>> wb[0] = la.ndtest((2, 3)).dump()
>>> sheet = wb[0]
>>> rng = sheet[:3, :4]
>>> rng
{0}*\{1}*    0   1   2   3
        0  a\b  b0  b1  b2
        1   a0   0   1   2
        2   a1   3   4   5
>>> # ok
... rng[:2, :2]
{0}*\{1}*    0   1
        0  a\b  b0
        1   a0   0
>>> # NOT ok
... rng[5:, 5:]
{0}*\{1}*     0     1     2
        0     5  None  None
        1  None  None  None
        2  None  None  None
        3  None  None  None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions