Skip to content

Commit

Permalink
ArraySpec docs
Browse files Browse the repository at this point in the history
fix documentation to be more accurate around nonspatial arrays
  • Loading branch information
pattonw committed Oct 6, 2023
1 parent abcecf2 commit b557548
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions gunpowder/array_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ class ArraySpec(Freezable):
roi (:class:`Roi`):
The region of interested represented by this array spec. Can be
``None`` for :class:`BatchProviders<BatchProvider>` that allow
requests for arrays everywhere, but will always be set for array
specs that are part of a :class:`Array`.
``None`` for nonspatial arrays but must otherwise always be set.
voxel_size (:class:`Coordinate`):
The size of the spatial axises in world units.
The size of the spatial axises in world units. Can be ``None`` for
nonspatial arrays but must otherwise always be set.
interpolatable (``bool``):
Expand Down Expand Up @@ -55,7 +54,10 @@ 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"
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 b557548

Please sign in to comment.