Skip to content
Snippets Groups Projects
Commit d6b24a75 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Doc fix and additional check in axisBounds

parent 5d431a9f
No related branches found
No related tags found
No related merge requests found
......@@ -310,7 +310,7 @@ def axisBounds(shape,
:arg axes: The world coordinate system axis bounds to calculate.
:arg origin: Either ``'centre'`` (the default) or ``'origin'``.
:arg origin: Either ``'centre'`` (the default) or ``'corner'``.
:arg boundary: Either ``'high'`` (the default), ``'low'``, ''`both'``,
or ``None``.
......@@ -318,9 +318,8 @@ def axisBounds(shape,
:arg offset: Amount by which the boundary voxel coordinates should be
offset. Defaults to ``1e-4``.
:returns: A list of tuples, one for each axis specified in the
``axes`` argument. Each tuple contains the ``(lo, hi)``
bounds of the corresponding world coordinate system axis.
:returns: A tuple containing the ``(low, high)`` bounds for each
requested world coordinate system axis.
"""
origin = origin.lower()
......@@ -331,6 +330,8 @@ def axisBounds(shape,
if origin not in ('centre', 'corner'):
raise ValueError('Invalid origin value: {}'.format(origin))
if boundary not in ('low', 'high', 'both', None):
raise ValueError('Invalid boundary value: {}'.format(boundary))
scalar = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment