4e904cc50e793112b406f834d7432e766c6a0be4,geomstats/geometry/general_linear.py,GeneralLinear,random_uniform,#GeneralLinear#Any#Any#,38

Before Change


            num_bad_samples = gs.sum(indcs)
            if num_bad_samples == 0:
                break
            samples[indcs, :] = gs.random.rand(num_bad_samples, self.n, self.n)
        if n_samples == 1:
            samples = gs.squeeze(samples, axis=0)
        return samples

After Change


            replaced_indices = [i for i in range(num_bad_samples) if indcs[i]]
            value_indices = list(
                product(replaced_indices, range(self.n), range(self.n)))
            samples = gs.assignment(
                samples, gs.flatten(new_samples), value_indices)
        if n_samples == 1:
            samples = gs.squeeze(samples, axis=0)
        return samples
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: geomstats/geomstats
Commit Name: 4e904cc50e793112b406f834d7432e766c6a0be4
Time: 2020-04-19
Author: 62605255+pchauchat@users.noreply.github.com
File Name: geomstats/geometry/general_linear.py
Class Name: GeneralLinear
Method Name: random_uniform


Project Name: geomstats/geomstats
Commit Name: 9af7443915f56492661e3664f73ec7d158e1a2b7
Time: 2020-04-20
Author: ninamio78@gmail.com
File Name: geomstats/geometry/hypersphere.py
Class Name: HypersphereMetric
Method Name: exp


Project Name: geomstats/geomstats
Commit Name: 4e904cc50e793112b406f834d7432e766c6a0be4
Time: 2020-04-19
Author: 62605255+pchauchat@users.noreply.github.com
File Name: geomstats/geometry/hypersphere.py
Class Name: Hypersphere
Method Name: random_uniform