Skip to content

Commit a7d18e0

Browse files
committed
Improve handling of dtype arguments in virtual fields.
1 parent 5c012af commit a7d18e0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/nexusformat/nexus/tree.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4554,6 +4554,10 @@ def __init__(self, target, files, name='unknown', shape=None, idx=None,
45544554
target = target.nxfilepath
45554555
elif shape is None:
45564556
raise NeXusError('The shape has not been specified')
4557+
elif dtype is None:
4558+
raise NeXusError('The dtype has not been specified')
4559+
else:
4560+
dtype = _getdtype(dtype)
45574561
self._vshape = shape
45584562
self._vidx = idx
45594563
self._vpath = target

0 commit comments

Comments
 (0)