diff --git a/src/xtgeo/cube/cube1.py b/src/xtgeo/cube/cube1.py index 8082ea291..1bd09c854 100644 --- a/src/xtgeo/cube/cube1.py +++ b/src/xtgeo/cube/cube1.py @@ -430,11 +430,7 @@ def xlines(self, values): @property def zslices(self): """Return the time/depth slices as an int array (read only).""" - # This is a derived property - zslices = range( - int(self.zori), int(self.zori + self.nlay * self.zinc), int(self.zinc) - ) - return np.array(zslices) + return np.array(range(self.nlay)) # This is a derived property @property def traceidcodes(self): diff --git a/tests/test_cube/test_cube.py b/tests/test_cube/test_cube.py index 211f519d0..04870bf2b 100644 --- a/tests/test_cube/test_cube.py +++ b/tests/test_cube/test_cube.py @@ -44,6 +44,7 @@ def test_create(): vec = xcu.values xdim, _ydim, _zdim = vec.shape assert xdim == 5, "NX from numpy shape " + assert xcu.zslices.tolist() == [0, 1, 2, 3] @pytest.mark.parametrize(