Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
db15e323
Commit
db15e323
authored
13 years ago
by
Ger van Diepen
Browse files
Options
Downloads
Patches
Plain Diff
Task #3116
Had to change expand function too
parent
129db03f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
LCS/pyparameterset/src/__init__.py
+4
-0
4 additions, 0 deletions
LCS/pyparameterset/src/__init__.py
LCS/pyparameterset/src/pyparameterset.cc
+3
-1
3 additions, 1 deletion
LCS/pyparameterset/src/pyparameterset.cc
with
7 additions
and
1 deletion
LCS/pyparameterset/src/__init__.py
+
4
−
0
View file @
db15e323
...
@@ -47,6 +47,10 @@ class parametervalue(PyParameterValue):
...
@@ -47,6 +47,10 @@ class parametervalue(PyParameterValue):
"""
Get the full parameter value.
"""
"""
Get the full parameter value.
"""
return
self
.
get
()
return
self
.
get
()
def
expand
(
self
):
"""
Expand the value.
"""
return
parametervalue
(
self
.
_expand
(),
_copyObj
=
True
)
def
getVector
(
self
):
def
getVector
(
self
):
"""
Get the value as a vector of values.
"""
"""
Get the value as a vector of values.
"""
return
[
parametervalue
(
v
,
_copyObj
=
True
)
for
v
in
self
.
_getVector
()]
return
[
parametervalue
(
v
,
_copyObj
=
True
)
for
v
in
self
.
_getVector
()]
...
...
This diff is collapsed.
Click to expand it.
LCS/pyparameterset/src/pyparameterset.cc
+
3
−
1
View file @
db15e323
...
@@ -55,6 +55,8 @@ namespace LOFAR {
...
@@ -55,6 +55,8 @@ namespace LOFAR {
PyParameterValue
(
const
ParameterValue
&
pvalue
)
PyParameterValue
(
const
ParameterValue
&
pvalue
)
:
ParameterValue
(
pvalue
)
:
ParameterValue
(
pvalue
)
{}
{}
PyParameterValue
expand
()
const
{
return
ParameterValue
::
expand
();
}
vector
<
PyParameterValue
>
getVector
()
const
vector
<
PyParameterValue
>
getVector
()
const
{
return
convertPVVector
(
ParameterValue
::
getVector
());
}
{
return
convertPVVector
(
ParameterValue
::
getVector
());
}
PyParameterSet
getRecord
()
const
;
PyParameterSet
getRecord
()
const
;
...
@@ -181,7 +183,7 @@ namespace LOFAR {
...
@@ -181,7 +183,7 @@ namespace LOFAR {
.
def
(
"get"
,
&
ParameterValue
::
get
,
.
def
(
"get"
,
&
ParameterValue
::
get
,
return_value_policy
<
copy_const_reference
>
(),
return_value_policy
<
copy_const_reference
>
(),
"Get the original value."
)
"Get the original value."
)
.
def
(
"expand"
,
&
ParameterValue
::
expand
,
.
def
(
"
_
expand"
,
&
Py
ParameterValue
::
expand
,
"Expand possible range and repeat values (using .. and *)"
)
"Expand possible range and repeat values (using .. and *)"
)
.
def
(
"isVector"
,
&
ParameterValue
::
isVector
,
.
def
(
"isVector"
,
&
ParameterValue
::
isVector
,
"Test if the value contains a vector (if enclosed in [])"
)
"Test if the value contains a vector (if enclosed in [])"
)
...
...
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