Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
06676a77
Commit
06676a77
authored
May 18, 2016
by
theos
Browse files
Streamlined docstring
parent
fbd95e94
Pipeline
#3175
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty_utilities.py
View file @
06676a77
...
...
@@ -7,19 +7,15 @@ from itertools import product
def
get_slice_list
(
shape
,
axes
):
"""
Helper function which generate slice list(s) to traverse over all
combinations of axes, other than the selected axes. This is used in
conjunction with outer-product spaces. The generated slice list can
passed to the target outer-product space to extract the selected
data. The target outer-product space can be either a d2o object or
a numpy.ndarray.
Helper function which generates slice list(s) to traverse over all
combinations of axes, other than the selected axes.
Parameters
----------
shape: tuple
Shape of the
target d2o object or numpy.ndarray
.
Shape of the
data array to traverse over
.
axes: tuple
Axes
along which data needs to
be
ext
ra
c
ted.
Axes
which should not
be
ite
rated
over
.
Yields
-------
...
...
@@ -33,6 +29,7 @@ def get_slice_list(shape, axes):
ValueError
If axes(axis) does not match shape.
"""
if
not
shape
:
raise
ValueError
(
about
.
_errors
.
cstring
(
"ERROR: shape cannot be None."
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment