Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
f456f6bd
Commit
f456f6bd
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Query method docs, changed MAtch string repr
parent
6bd0d7c2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/utils/filetree/query.py
+11
-3
11 additions, 3 deletions
fsl/utils/filetree/query.py
with
11 additions
and
3 deletions
fsl/utils/filetree/query.py
+
11
−
3
View file @
f456f6bd
...
...
@@ -148,11 +148,19 @@ class FileTreeQuery(object):
def
query
(
self
,
short_name
,
**
variables
):
"""
Search for files of the given ``short_name``, which match
the specified ``variables``.
the specified ``variables``. All hits are returned for variables
that are unspecified.
:arg short_name: Short name of files to search for.
All other arguments are
All other arguments are assumed to be ``variable=value`` pairs,
used to restrict which matches are returned. All values are returned
for variables that are not specified, or variables which are given a
value of ``
'
*
'
``.
:returns: A ``numpy.array`` of ``Match`` objects, with axes
corresponding to the labels returned by the :meth:`axes`
method.
"""
varnames
=
list
(
variables
.
keys
())
...
...
@@ -260,7 +268,7 @@ class Match(object):
def
__repr__
(
self
):
"""
Returns a string representation of this ``Match``.
"""
return
'
Match({})
{}
'
.
format
(
self
.
filename
,
self
.
variables
)
return
'
Match({})
'
.
format
(
self
.
filename
)
def
__str__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment