844bcf22b8e2c95ed0e6213abdea3796a1e06829,cnvlib/gary.py,GenomicArray,__init__,#GenomicArray#Any#Any#,26

Before Change


                                 + repr(self._required_columns))
            // Ensure chromosomes are strings to avoid integer conversion of 1, 2...
            if not isinstance(data_table.chromosome.iat[0], basestring):
                data_table["chromosome"] = (data_table["chromosome"]
                                            .astype("str"))
        elif not isinstance(data_table, pd.DataFrame):
            // Empty but conformant table
            data_table = self._make_blank()
        self.data = data_table

After Change


            // Ensure columns are the right type
            // (in case they"ve been automatically converted to the wrong type,
            // e.g. chromosome names as integers; genome coordinates as floats)
            for col, dtype in zip(self._required_columns, self._required_dtypes):
                // if data_table[col].dtype != np.dtype(dtype):
                if not isinstance(data_table[col].iat[0], dtype):
                    data_table[col] = data_table[col].astype(dtype)
        elif not isinstance(data_table, pd.DataFrame):
            // Empty but conformant table
            data_table = self._make_blank()
        self.data = data_table
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: etal/cnvkit
Commit Name: 844bcf22b8e2c95ed0e6213abdea3796a1e06829
Time: 2016-09-08
Author: eric.talevich@gmail.com
File Name: cnvlib/gary.py
Class Name: GenomicArray
Method Name: __init__


Project Name: keras-team/keras
Commit Name: 9333179ad96fad2760221f2b3e2dec31f7c77f40
Time: 2016-12-19
Author: francois.chollet@gmail.com
File Name: keras/utils/test_utils.py
Class Name:
Method Name: layer_test


Project Name: aleju/imgaug
Commit Name: 7b66884559aac886c971d1846255182b1604ec8f
Time: 2018-12-17
Author: kontakt@ajung.name
File Name: imgaug/augmenters/arithmetic.py
Class Name: JpegCompression
Method Name: _augment_images