f3f4bf67ad87c4d30e3694e251d274c3b85c81da,GPy/__init__.py,,load,#Any#,37

Before Change


        try:
            import cPickle as pickle
            if isinstance(file_or_path, basestring):
                with open(file_or_path, "rb") as f:
                    u = pickle._Unpickler(f)
                    u.encoding = "latin1"
                    m = u.load()
            else:
                 m = pickle.load(file_or_path)
        except:
            import pickle

After Change


    for name, module in inspect.getmembers(kern.src):
        if not name.startswith("_"):
            sys.modules["GPy.kern._src.{}".format(name)] = module
    try:
        import pickle
        strcl = basestring
    except ImportError: //python3
        import pickle
        strcl = str

    if isinstance(file_or_path, strcl):
        with open(file_or_path, "rb") as f:
            m = pickle.load(f)
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: SheffieldML/GPy
Commit Name: f3f4bf67ad87c4d30e3694e251d274c3b85c81da
Time: 2015-11-09
Author: ibinbei@gmail.com
File Name: GPy/__init__.py
Class Name:
Method Name: load


Project Name: bashtage/linearmodels
Commit Name: 9b29c3bae8fff2e31edeb911c69840b53974e45b
Time: 2017-03-16
Author: kevin.k.sheppard@gmail.com
File Name: setup.py
Class Name:
Method Name:


Project Name: akkana/scripts
Commit Name: e1e3f45530006843db21dc084f2dde2725056168
Time: 2018-06-24
Author: akkana@shallowsky.com
File Name: quickbrowse.py
Class Name:
Method Name: