Just that it is different beast
Methods
reset() | Simply reset the flag |
reset_value() | Reset value to the default |
Specify a Parameter with a default value and arbitrary number of additional attributes.
Parameters : | constraints : callable
name : str
doc : str
index : int or None
ro : bool
value :
|
---|
Examples
-ensure the parameter to be of type float (None not allowed as value): constraints = EnsureFloat() >>> from mvpa2.base.param import Parameter >>> from mvpa2.base.constraints import (EnsureFloat, EnsureRange, ... AltConstraints, Constraints) >>> C = Parameter(23.0, constraints=EnsureFloat())
-ensure the parameter to be of type float or to be None: >>> C = Parameter(23.0, constraints=AltConstraints(EnsureFloat(), None))
-ensure the parameter to be None or to be of type float and lie in the inclusive range (7.0,44.0): >>> C = Parameter(23.0, AltConstraints(Constraints(EnsureFloat(), ... EnsureRange(min=7.0,max=44.0)), ... None))
Methods
reset() | Simply reset the flag |
reset_value() | Reset value to the default |