6148d1b5107a295310d06adbabff4dc6dee9d33e,pymc3/distributions/bound.py,_Bounded,_random,#_Bounded#Any#Any#Any#Any#,48

Before Change


        if lower.size > 1 or upper.size > 1:
            raise ValueError("Drawing samples from distributions with "
                             "array-valued bounds is not supported.")
        samples = np.zeros(size, dtype=self.dtype).flatten()
        i, n = 0, len(samples)
        while i < len(samples):
            sample = np.atleast_1d(self._wrapped.random(point=point, size=n))

            select = sample[np.logical_and(sample >= lower, sample <= upper)]
            samples[i:(i + len(select))] = select[:]
            i += len(select)
            n -= len(select)
        if size is not None:

After Change


        samples = []
        s = 0
        while s < total_size:
            sample = np.atleast_1d(
                self._wrapped.random(point=point, size=total_size)
            ).flatten()

            select = sample[np.logical_and(sample >= lower, sample <= upper)]
            samples.append(select)
            s += len(select)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pymc-devs/pymc3
Commit Name: 6148d1b5107a295310d06adbabff4dc6dee9d33e
Time: 2019-04-18
Author: fonnesbeck@gmail.com
File Name: pymc3/distributions/bound.py
Class Name: _Bounded
Method Name: _random


Project Name: automl/auto-sklearn
Commit Name: 679e77b78f7ba906cd2e6aa18366fa8facd153db
Time: 2017-02-11
Author: feurerm@informatik.uni-freiburg.de
File Name: test/test_evaluation/test_test_evaluator.py
Class Name: TestEvaluator_Test
Method Name: test_datasets


Project Name: SheffieldML/GPy
Commit Name: bea74ac5231e47cce34170273771fd61a39e6b73
Time: 2014-03-17
Author: acq11ra@sheffield.ac.uk
File Name: GPy/likelihoods/mixed_noise.py
Class Name: MixedNoise
Method Name: covariance_matrix