bd0f9dfdd22d3043daf8bd6bff010eee4a0d6975,pymanopt/manifolds/product.py,Product,rand,#Product#,65

Before Change


                              for k in range(0, self._nmanifolds)])

    def rand(self):
        return [self._manifolds[k].rand()
                for k in range(0, self._nmanifolds)]

    def randvec(self, X):
        return _TangentVector([1/np.sqrt(self._nmanifolds) *

After Change


                               for k, man in enumerate(self._manifolds)])

    def rand(self):
        return [man.rand() for man in self._manifolds]

    def randvec(self, X):
        scale = len(self._manifolds) ** (-1/2)
        return _TangentVector([scale * man.randvec(X[k])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pymanopt/pymanopt
Commit Name: bd0f9dfdd22d3043daf8bd6bff010eee4a0d6975
Time: 2018-04-30
Author: niklas.koep@gmail.com
File Name: pymanopt/manifolds/product.py
Class Name: Product
Method Name: rand


Project Name: dnouri/skorch
Commit Name: a7cd7a15a9baf741f2b4fcd32f3d8055827889b5
Time: 2017-08-08
Author: marian.tietz@ottogroup.com
File Name: examples/word_language_model/predict.py
Class Name:
Method Name:


Project Name: scikit-multiflow/scikit-multiflow
Commit Name: 554e2dda6e15976d6b9d4657b2eeff323636514b
Time: 2018-05-23
Author: bader.d24@gmail.com
File Name: src/skmultiflow/data/generators/hyper_plane_generator.py
Class Name: HyperplaneGenerator
Method Name: __configure