Returns the bounds of the free hyperparameters.
        
        Returns
        -------
        free_param_bounds : :py:class:`Array`
            Array of the bounds of the free parameters, in order.
970343
def free_param_bounds(self):
        
        return scipy.concatenate((self.k1.free_param_bounds, self.k2.free_param_bounds))
207355
def paramsarraybounds(self):
        """"""
        bounds = []
        for (i, param) in self._index_to_param.items():
            if isinstance(param, str):
                bounds.append(self.model.PARAMLIMITS[param])
            elif isinstance(param, tuple):
                bounds.append(self.model.PARAMLIMITS[param[0]])
            else:
                raise ValueError("Invalid param type")
        bounds = [(tup[0] + ALMOST_ZERO, tup[1] - ALMOST_ZERO) for tup in bounds]
        assert len(bounds) == len(self._index_to_param)
        return tuple(bounds)
382513
def bounding_cylinder(self):
        
        from . import primitives, bounds
        kwargs = bounds.minimum_cylinder(self)
        mincyl = primitives.Cylinder(mutable=False, **kwargs)
        return mincyl
131151
def hyperparameter_ranges(self):
        
        hyperparameter_ranges = dict()
        for range_type in ParameterRange.__all_types__:
            parameter_ranges = []
            for parameter_name, parameter in self._hyperparameter_ranges.items():
                if parameter is not None and parameter.__name__ == range_type:
                    # Categorical parameters needed to be serialized as JSON for our framework containers
                    if isinstance(parameter, CategoricalParameter) and isinstance(self.estimator, Framework):
                        tuning_range = parameter.as_json_range(parameter_name)
                    else:
                        tuning_range = parameter.as_tuning_range(parameter_name)
                    parameter_ranges.append(tuning_range)
            hyperparameter_ranges[range_type + 'ParameterRanges'] = parameter_ranges
        return hyperparameter_ranges
1003760
def region(self, bounds):
        
        if not isinstance(bounds, Bounds):
            raise TypeError("region param bounds must be isinstance of Bounds")
        _d = copy.copy(self)
        _d._bounds = bounds
        return _d
789098
def update_bounds(self, bounds):
        '''

        '''
        starts =  bounds[:,0,:]
        ends = bounds[:,1,:]

        self.bounds = bounds
        self.lengths =  np.sqrt(((ends - starts)**2).sum(axis=1))
        
        vertices, normals, colors = self._process_reference()
        
        self.tr.update_vertices(vertices)
        self.tr.update_normals(normals)
1336894
def _get_self_bounds(self):
        
        bounds = [[None, None], [None, None]]
        for point in self.data:
            bounds = [
                [
                    none_min(bounds[0][0], point[0]),
                    none_min(bounds[0][1], point[1]),
                ],
                [
                    none_max(bounds[1][0], point[0]),
                    none_max(bounds[1][1], point[1]),
                ],
            ]
        return bounds
768399
def get_Tuple_params(tpl):
    
    try:
        return tpl.__tuple_params__
    except AttributeError:
        try:
            if tpl.__args__ is None:
                return None
            # Python 3.6
            if tpl.__args__[0] == ():
                return ()
            else:
                if tpl.__args__[-1] is Ellipsis:
                    return tpl.__args__[:-1] if len(tpl.__args__) > 1 else None
                else:
                    return tpl.__args__
        except AttributeError:
            return None
325432
def get_free_dims(model, visible_dims, fixed_dims):
    
    if visible_dims is None:
        visible_dims = np.arange(model.input_dim)
    dims = np.asanyarray(visible_dims)
    if fixed_dims is not None:
        dims = [dim for dim in dims if dim not in fixed_dims]
    return np.asanyarray([dim for dim in dims if dim is not None])
1135782
def bounds(self):
        
        return np.array([self.vertices.min(axis=0),
                         self.vertices.max(axis=0)])
187684
def param_names(self):
        
        pn = CombinedBounds(self.k.param_names, self.noise_k.param_names)
        if self.mu is not None:
            pn = CombinedBounds(pn, self.mu.param_names)
        return pn
169525
def bounds(self):
        
        # return bounds including ONLY referenced vertices
        in_mesh = self.vertices[self.referenced_vertices]
        # get mesh bounds with min and max
        mesh_bounds = np.array([in_mesh.min(axis=0),
                                in_mesh.max(axis=0)])
        # should not be mutable
        mesh_bounds.flags.writeable = False
        return mesh_bounds
70927
def enforce_bounds(self):
        
        too_big = self.parameter_data.loc[:,"parval1"] > \
            self.parameter_data.loc[:,"parubnd"]
        self.parameter_data.loc[too_big,"parval1"] = \
            self.parameter_data.loc[too_big,"parubnd"]

        too_small = self.parameter_data.loc[:,"parval1"] < \
            self.parameter_data.loc[:,"parlbnd"]
        self.parameter_data.loc[too_small,"parval1"] = \
            self.parameter_data.loc[too_small,"parlbnd"]
319298
def get_bounding_box(self):
        
        return (np.min(self.data["longitude"]),
                np.max(self.data["longitude"]),
                np.min(self.data["latitude"]),
                np.max(self.data["latitude"]))
1139838
def get_function_pars(fn):
    

    pars = []
    par_names = pyLike.StringVector()
    fn.getParamNames(par_names)

    for pname in par_names:

        par = fn.getParam(pname)
        bounds = par.getBounds()
        perr = par.error() if par.isFree() else np.nan
        pars += [dict(name=pname,
                      value=par.getValue(),
                      error=perr,
                      min=bounds[0],
                      max=bounds[1],
                      free=par.isFree(),
                      scale=par.getScale())]

    return pars
644878
def _get_bounds(mapper, values):
        

        array = np.array([mapper.get(x) for x in values])
        return array[:, 0], array[:, 1]
1204493
def free_params(self):
        
        p = CombinedBounds(self.k.free_params, self.noise_k.free_params)
        if self.mu is not None:
            p = CombinedBounds(p, self.mu.free_params)
        return p