e3fd56b08ed5c4d7247a147c3fab7c0fe59e9a0e,pymc3/tests/test_mixture.py,,generate_poisson_mixture_data,#Any#Any#Any#,21
Before Change
def generate_poisson_mixture_data(w, mu, size=1000):
component = np.random.choice(w.size, size=size, p=w)
x = np.random.poisson(mu[component], size=size)
return x
After Change
def generate_poisson_mixture_data(w, mu, size=1000):
component = np.random.choice(w.size, size=size, p=w)
mu = np.atleast_1d(mu)
out_size = to_tuple(size) + mu.shape[:-1]
mu_ = np.array([mu[..., comp] for comp in component.ravel()])
mu_ = np.reshape(mu_, out_size)
x = np.random.poisson(mu_, size=out_size)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: pymc-devs/pymc3
Commit Name: e3fd56b08ed5c4d7247a147c3fab7c0fe59e9a0e
Time: 2019-02-16
Author: luciano.paz.neuro@gmail.com
File Name: pymc3/tests/test_mixture.py
Class Name:
Method Name: generate_poisson_mixture_data
Project Name: pymc-devs/pymc3
Commit Name: e3fd56b08ed5c4d7247a147c3fab7c0fe59e9a0e
Time: 2019-02-16
Author: luciano.paz.neuro@gmail.com
File Name: pymc3/tests/test_mixture.py
Class Name:
Method Name: generate_normal_mixture_data
Project Name: qubvel/segmentation_models
Commit Name: 9dab90d20bc5e2cccd78b4b4d6156ec5c8c83257
Time: 2018-09-05
Author: qubvel@gmail.com
File Name: segmentation_models/unet/builder.py
Class Name:
Method Name: build_unet