215ea67a9cc7b5eb6ffc68fba02cbd4c2f77e616,deepchem/splits/__init__.py,StratifiedSplitter,__randomize_arrays,#StratifiedSplitter#Any#,88

Before Change


  

    def __randomize_arrays(self, array_list):
        generator_state = np.random.get_state()
        for array in array_list:
            np.random.shuffle(array)
            np.random.set_state(generator_state)
        return array_list

After Change



    def __randomize_arrays(self, array_list):
        //assumes that every array is of the same dimension
        numRows = array_list[0].shape[0]
        perm = np.random.permutation(numRows)
        for array in array_list:
            array = array[perm]
        return array_list
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: deepchem/deepchem
Commit Name: 215ea67a9cc7b5eb6ffc68fba02cbd4c2f77e616
Time: 2016-08-01
Author: apappu97@gmail.com
File Name: deepchem/splits/__init__.py
Class Name: StratifiedSplitter
Method Name: __randomize_arrays


Project Name: home-assistant/home-assistant
Commit Name: 1ca09ea36f80458cd9819d85b9aae29c1ed343a4
Time: 2018-09-14
Author: rohan@rohankapoor.com
File Name: homeassistant/components/switch/zoneminder.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 1ca09ea36f80458cd9819d85b9aae29c1ed343a4
Time: 2018-09-14
Author: rohan@rohankapoor.com
File Name: homeassistant/components/sensor/zoneminder.py
Class Name:
Method Name: setup_platform