Skip to content

Commit 9c6e48d

Browse files
committed
[testDataArray] add test case for range dim which fails ...
for slices starting before the first element, due to index mode less_or_equal
1 parent e5df5fb commit 9c6e48d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nixio/test/test_data_array.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@ def test_get_slice(self):
415415
dslice = da2d.get_slice((12.0, 1), (4.0, 1),
416416
mode=nix.DataSliceMode.Data)
417417
np.testing.assert_almost_equal(data, dslice)
418+
dslice2 = da2d.get_slice((0.0, 1), (16.0, 1),
419+
mode=nix.DataSliceMode.Data)
420+
np.testing.assert_almost_equal(da2d[0:30, 1:2], dslice2)
418421

419422
data3d = np.random.random_sample((30, 30, 5))
420423
da3d = self.block.create_data_array("get_slice 3d", "Data",

0 commit comments

Comments
 (0)