gmggroup / omf-python

Python library for working with OMF files
MIT License
79 stars 19 forks source link

Should VolumeGridGeometry tensor_X be able to be empty list? #126

Open WesleyTheGeolien opened 1 year ago

WesleyTheGeolien commented 1 year ago

In omf version 1.0.1

there is no problem with this (read it does not error):

 omf.VolumeElement(
      name='vol',
      geometry=omf.VolumeGridGeometry(
          axis_u=(1, 0, 0),
          axis_v=(0, 1, 0),
          axis_w=(0, 0, 1),
          tensor_u=np.ones(10).astype(float),
          tensor_v=np.ones(15).astype(float),
          tensor_w=[],
          origin=[10., 10., -10]
      ),
  )

Should this be the case? should the init validation of VolumeGridGeometry check that the tensors are not empty?