Skip to content

Commit

Permalink
ArraySpec bug fix:
Browse files Browse the repository at this point in the history
allow None roi/voxel size for spatial arrays
  • Loading branch information
pattonw committed Oct 6, 2023
1 parent b557548 commit 80033bd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gunpowder/array_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class ArraySpec(Freezable):
roi (:class:`Roi`):
The region of interested represented by this array spec. Can be
``None`` for nonspatial arrays but must otherwise always be set.
``None`` for nonspatial arrays or to indicate the true value is unknown.
voxel_size (:class:`Coordinate`):
The size of the spatial axises in world units. Can be ``None`` for
nonspatial arrays but must otherwise always be set.
nonspatial arrays or to indicate the true value is unknown.
interpolatable (``bool``):
Expand Down Expand Up @@ -55,9 +55,6 @@ def __init__(
if nonspatial:
assert roi is None, "Non-spatial arrays can not have a ROI"
assert voxel_size is None, "Non-spatial arrays can not have a voxel size"
else:
assert roi is not None, "Spatial arrays must have a ROI"
assert voxel_size is not None, "Spatial arrays must have a voxel size"

self.freeze()

Expand Down

0 comments on commit 80033bd

Please sign in to comment.