Skip to content

Commit 1a7930c

Browse files
committed
use sc.zeros for Empty/Dummy Fields
1 parent 29845d0 commit 1a7930c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ess/reduce/nexus/workflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def __init__(self, sizes: dict[str, int]):
519519
self.shape = tuple(sizes.values())
520520

521521
def __getitem__(self, key: Any) -> sc.Variable:
522-
return sc.empty(dims=self.dims, shape=self.shape, unit=None)
522+
return sc.zeros(dims=self.dims, shape=self.shape, unit=None, dtype='int32')
523523

524524

525525
class _StrippedDetector(snx.NXdetector):
@@ -574,7 +574,7 @@ def __init__(self, dim: str):
574574
self.shape = (0,)
575575

576576
def __getitem__(self, key: Any) -> sc.Variable:
577-
return sc.empty(dims=self.dims, shape=self.shape, unit=None)
577+
return sc.zeros(dims=self.dims, shape=self.shape, unit=None, dtype='int32')
578578

579579

580580
class _StrippedMonitor(snx.NXmonitor):

0 commit comments

Comments
 (0)