9a8f5127d38037de5d56ba2279fbaff6d8374960,pymc3/distributions/discrete.py,BetaBinomial,_random,#BetaBinomial#Any#Any#Any#Any#,155

Before Change



    def _random(self, alpha, beta, n, size=None):
        size = size or 1
        p = np.atleast_1d(stats.beta.rvs(a=alpha, b=beta, size=np.prod(size)))
        // Sometimes scipy.beta returns nan. Ugh.
        while np.any(np.isnan(p)):
            i = np.isnan(p)

After Change


            i = np.isnan(p)
            p[i] = stats.beta.rvs(a=alpha, b=beta, size=np.sum(i))
        // Sigh...
        _n, _p, _size = np.atleast_1d(n).flatten(), p.flatten(), p.shape[0]

        quotient, remainder = divmod(_p.shape[0], _n.shape[0])
        if remainder != 0:
            raise TypeError("n has a bad size! Was cast to {}, must evenly divide {}".format(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 7

Non-data size: 3

Instances


Project Name: pymc-devs/pymc3
Commit Name: 9a8f5127d38037de5d56ba2279fbaff6d8374960
Time: 2018-06-17
Author: colcarroll@gmail.com
File Name: pymc3/distributions/discrete.py
Class Name: BetaBinomial
Method Name: _random


Project Name: nilearn/nilearn
Commit Name: c3077cd44e638d83094d7e96b1385ef0abd9b2d5
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: nilearn/sparse_models/tv.py
Class Name:
Method Name: tvl1_solver


Project Name: scipy/scipy
Commit Name: 38a25749cea903bb61c8470824f654c8fef622a2
Time: 2020-05-07
Author: mdhaber@mit.edu
File Name: scipy/sparse/linalg/dsolve/linsolve.py
Class Name:
Method Name: _get_umf_family


Project Name: stanford-mast/nn_dataflow
Commit Name: a1c8c7eb8e161adcd444d44d44ec54ba17343a34
Time: 2017-06-28
Author: mgao12@stanford.edu
File Name: nn_dataflow/LoopBlockingScheme.py
Class Name: LoopBlockingScheme
Method Name: gen_index


Project Name: nilearn/nilearn
Commit Name: 0019a336d67b10db54897661fe467e332a552440
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: nilearn/sparse_models/tv.py
Class Name:
Method Name: tvl1_solver


Project Name: pyprob/pyprob
Commit Name: 9136c548fce88f99d05b65ed1ae396dee5bc5a76
Time: 2018-09-19
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/nn/inference_network_feedforward.py
Class Name: InferenceNetworkFeedForward
Method Name: _init_layer_observe_embeddings


Project Name: scikit-image/scikit-image
Commit Name: 13df5b1a4687c48abf3cdc1894b100936d7e8f0a
Time: 2019-11-12
Author: r.fezzani@vitadx.com
File Name: skimage/measure/tests/test_marching_cubes.py
Class Name:
Method Name: test_both_algs_same_result_donut