Ejemplo n.º 1
0
 def __init__(self,default=[],class_=None,instantiate=True,
              bounds=(0,None),**params):
     self.class_ = class_
     self.bounds = bounds
     self._check_bounds(default)
     Parameter.__init__(self,default=default,instantiate=instantiate,
                        **params)
Ejemplo n.º 2
0
 def __init__(self,
              default=False,
              bounds=(0, 1),
              allow_None=False,
              **params):
     self.bounds = bounds
     self.allow_None = (default is None or allow_None)
     Parameter.__init__(self, default=default, **params)
Ejemplo n.º 3
0
 def __init__(self,default=(0,0),length=None,**params):
     """
     Initialize a numeric tuple parameter with a fixed length
     (number of elements).  The length is determined by the initial
     default value, and is not allowed to change after
     instantiation.
     """
     if length is None:
         self.length = len(default)
     else:
         self.length = length
         
     self._check(default)
     Parameter.__init__(self,default=default,**params)
Ejemplo n.º 4
0
 def __init__(self,default=False,bounds=(0,1),allow_None=False,**params):
     self.bounds = bounds
     self.allow_None = (default is None or allow_None)
     Parameter.__init__(self,default=default,**params)