equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
109 stars 56 forks source link

For `Cube`, `zslices` does not work if `zinc` is not an integer #1206

Closed jcrivenaes closed 1 month ago

jcrivenaes commented 1 month ago
>>> c = xtgeo.Cube(ncol=2, nrow=4, nlay=2, zinc=0.5, yinc=1, xinc=3, values=0)
>>> c.zslices
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jan/work/git/xtg/xtgeo/src/xtgeo/cube/cube1.py", line 434, in zslices
    zslices = range(
              ^^^^^^
ValueError: range() arg 3 must not be zero