465d854b02acf2266b77eb62a6069cba4dc71d4a,ggplot/geoms/geom.py,geom,__init__,#geom#,5

Before Change


        if "colour" in kwargs:
            kwargs["color"] = kwargs["colour"]
            del kwargs["colour"]
        if len(args)==1:
            if isinstance(args[0], aes):
                self.manual_aes = {k: v for k, v in kwargs.items() if k in self.VALID_AES}
                return
        self.manual_aes = {k: v for k, v in kwargs.items() if k in self.VALID_AES}

    def __radd__(self, gg):
        gg = deepcopy(gg)

After Change


    aes = None
    def __init__(self, *args, **kwargs):
        // new dict for each geom
        self.aes = {}
        for arg in args:
            if isinstance(arg, aes):
                self.aes.update({k: v for k, v in arg.items() if k in self.VALID_AES})
            elif isinstance(arg, DataFrame):
                self.data = arg
            else:
                raise Exception("Unknown argument of type "{0}".".format(type(arg)))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: has2k1/plotnine
Commit Name: 465d854b02acf2266b77eb62a6069cba4dc71d4a
Time: 2013-12-10
Author: jasc@gmx.net
File Name: ggplot/geoms/geom.py
Class Name: geom
Method Name: __init__


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 32e4d362935db01ae4b3df9a6d8635b3da60cf64
Time: 2019-02-05
Author: k.zhou@qmul.ac.uk
File Name: train_vidreid_xent_htri.py
Class Name:
Method Name: train


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 32e4d362935db01ae4b3df9a6d8635b3da60cf64
Time: 2019-02-05
Author: k.zhou@qmul.ac.uk
File Name: train_imgreid_xent_htri.py
Class Name:
Method Name: train