Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion httomo/runner/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def slicing_dim(self) -> Literal[0, 1, 2]:

def _empty_aux_array(self):
empty_shape = list(self._data.shape)
empty_shape[self.slicing_dim] = 0
empty_shape[self.slicing_dim] = 1
return np.empty_like(self._data, shape=empty_shape)

@property
Expand Down
8 changes: 4 additions & 4 deletions tests/runner/test_dataset_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def test_full_block_for_global_data():
np.testing.assert_array_equal(data, block.data)
np.testing.assert_array_equal(angles, block.angles)
np.testing.assert_array_equal(angles, block.angles_radians)
assert block.darks.shape == (0, 10, 10)
assert block.dark.shape == (0, 10, 10)
assert block.flats.shape == (0, 10, 10)
assert block.flat.shape == (0, 10, 10)
assert block.darks.shape == (1, 10, 10)
assert block.dark.shape == (1, 10, 10)
assert block.flats.shape == (1, 10, 10)
assert block.flat.shape == (1, 10, 10)
assert block.darks.dtype == data.dtype
assert block.flats.dtype == data.dtype
assert block.dark.dtype == data.dtype
Expand Down
Loading