e2ab4ccd6cb5e306c66182ac8ff1ad2d8183df1c,cnvlib/gary.py,GenomicArray,_make_blank,#Any#,56

Before Change


    @classmethod
    def _make_blank(cls):
        Create an empty dataframe with the columns required by this class.
        table = pd.DataFrame({key: [] for key in cls._required_columns})
        for col, dtype in zip(cls._required_columns, cls._required_dtypes):
            table[col] = table[col].astype(dtype)
        return table

After Change


    @classmethod
    def _make_blank(cls):
        Create an empty dataframe with the columns required by this class.
        spec = list(zip(cls._required_columns, cls._required_dtypes))
        try:
            arr = np.zeros(0, dtype=spec)
            return pd.DataFrame(arr)
        except TypeError as exc:
            logging.info("%s", locals())
            raise
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: etal/cnvkit
Commit Name: e2ab4ccd6cb5e306c66182ac8ff1ad2d8183df1c
Time: 2016-10-07
Author: eric.talevich@gmail.com
File Name: cnvlib/gary.py
Class Name: GenomicArray
Method Name: _make_blank


Project Name: has2k1/plotnine
Commit Name: 329dfcea129f72eb3ea741dfc343d4c28c513c69
Time: 2014-02-06
Author: jasc@gmx.net
File Name: ggplot/ggplot.py
Class Name: ggplot
Method Name: _get_layers


Project Name: pmorissette/bt
Commit Name: 01cd6dab06e42a63a4240cd57eef9331179cf091
Time: 2014-05-06
Author: pm@rdacap.com
File Name: bt/backtest.py
Class Name: Backtest
Method Name: security_weights