The bounds of the random variable.
        
        Set `self.i=0.95` to return the 95% interval if this is used for setting
        bounds on optimizers/etc. where infinite bounds may not be useful.
504359
def bounds(self):
        
        return [scipy.stats.gamma.interval(self.i, a, loc=0, scale=1.0 / b) for a, b in zip(self.a, self.b)]
803996
def get_lower_bound(self):
        
        lower_bounds = []

        for distribution in self.distribs.values():
            lower_bound = distribution.percent_point(distribution.mean / 10000)
            if not pd.isnull(lower_bound):
                lower_bounds.append(lower_bound)

        return min(lower_bounds)
240410
def set_in_bounds(self,obj,val):
        
        if not callable(val):
            bounded_val = self.crop_to_bounds(val)
        else:
            bounded_val = val
        super(Number,self).__set__(obj,bounded_val)
442450
function () {
            var rx = this.radiusV.x,
                ry = this.radiusV.y,
                x = this.pos.x - rx,
                y = this.pos.y - ry,
                w = rx * 2,
                h = ry * 2;

            if (!this._bounds) {
                this._bounds = new me.Rect(x, y, w, h);
            }  else {
                this._bounds.setShape(x, y, w, h);
            }
            return this._bounds;
        }
1006501
def constant(interval=1):
    
    try:
        itr = iter(interval)
    except TypeError:
        itr = itertools.repeat(interval)

    for val in itr:
        yield val
1167800
def _param_bounds(self, gamma, q):
        
        if gamma < 1.4:
            gamma = 1.4
        if gamma > 2.9:
            gamma = 2.9
        if q < 0.01:
            q = 0.01
        return float(gamma), q
384209
function randomIntInRange(low, high) {
    return Math.round(low + (Math.random() * (high - low)));
  }
1140620
def range_min(self, i, k):
        
        return self._range_min(1, 0, self.N, i, k)
37975
public static int bound (int low, int value, int high)
    {
        return Math.min(high, Math.max(low, value));
    }
711236
def nhill_i(self,x,threshold=0.1,power=2):
        
        x_pow = np.power(x,power)
        threshold_pow = np.power(threshold,power)
        return threshold_pow / (x_pow + threshold_pow) * (1 - x_pow)
1368368
private int randomValue(IntVar x) {
        int i = rnd.nextInt(x.getDomainSize());
        DisposableValueIterator ite = x.getValueIterator(true);
        int pos = -1;
        try {
            while (i >= 0) {
                pos = ite.next();
                i--;
            }
        } finally {
            ite.dispose();
        }
        return pos;
    }
312101
def bound_range(vals, density, time_unit='us'):
    
    if not len(vals):
        return(np.nan, np.nan, density, False)
    low, high = vals.min(), vals.max()
    invert = False
    if len(vals) > 1 and vals[0] > vals[1]:
        invert = True
    if not density:
        with warnings.catch_warnings():
            warnings.filterwarnings('ignore', r'invalid value encountered in double_scalars')
            full_precision_density = compute_density(low, high, len(vals)-1)
            density = round(full_precision_density, sys.float_info.dig)
        if density == 0:
            density = full_precision_density
    if density == 0:
        raise ValueError('Could not determine Image density, ensure it has a non-zero range.')
    halfd = 0.5/density
    if isinstance(low, datetime_types):
        halfd = np.timedelta64(int(round(halfd)), time_unit)
    return low-halfd, high+halfd, density, invert
608276
def MaxLikeInterval(self, percentage=90):
        
        interval = []
        total = 0

        t = [(prob, val) for val, prob in self.Items()]
        t.sort(reverse=True)

        for prob, val in t:
            interval.append(val)
            total += prob
            if total >= percentage / 100.0:
                break

        return interval
544189
def get_bounds(self, bin_num):
        
        min_bound = (self.bin_size * bin_num) + self.min_value
        max_bound = min_bound + self.bin_size
        return self.Bounds(min_bound, max_bound)
943423
def valueAt(self, percent):
        
        min_val = self.minimum()
        max_val = self.maximum()
        
        # round the max value to sync with the values in the grid
        max_val = self.rounded(max_val)
        range_val = max(min(percent, 1.0), 0.0) * (max_val - min_val)
        return round(range_val + min_val, 1)
1143549
def min(self):
        
        return int(self._min) if not np.isinf(self._min) else self._min
1320172
def set_bounds(self, ymin, ymax, xmin, xmax, zmin, zmax, edist=None):
        """"""
        self.ymin, self.ymax = ymin, ymax
        self.xmin, self.xmax = xmin, xmax
        self.zmin, self.zmax = zmin, zmax
        self.edist = None