omf-python icon indicating copy to clipboard operation
omf-python copied to clipboard

Should VolumeGridGeometry tensor_X be able to be empty list?

Open WesleyTheGeolien opened this issue 2 years ago • 0 comments

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?

WesleyTheGeolien avatar Mar 23 '23 14:03 WesleyTheGeolien