sdc icon indicating copy to clipboard operation
sdc copied to clipboard

Add test on Series.getitem failure

Open akharche opened this issue 5 years ago • 2 comments

akharche avatar Feb 18 '20 13:02 akharche

What is the issue? getitem with negative slice is failing?

AlexanderKalistratov avatar Feb 19 '20 07:02 AlexanderKalistratov

What is the issue? getitem with negative slice is failing?

@akharche @AlexanderKalistratov The issue here is in the empty slice for the string series index only (other combinations seem to pass), i.e. original test fails on the second iteration, when start=-2, end=0 and index is ['2', '3', '5', '6', '7']. And the resulting slice should be:

a = np.asarray([1, 2, 3, 1, 2, 4, 5])
a[-2:0]
array([], dtype=int32)

kozlov-alexey avatar Feb 19 '20 12:02 kozlov-alexey