6637eb7ac808851f9902db6ad817e56ca44d0690,GPy/kern/_src/kern.py,Kern,add,#Kern#Any#Any#,133

Before Change


        else: kernels.append(self)
        if isinstance(other, Add): kernels.extend(other._parameters_)
        else: kernels.append(other)
        return Add(kernels, name=name)

    def __mul__(self, other):
         Here we overload the "*" operator. See self.prod for more information
        return self.prod(other)

After Change


        
        assert isinstance(other, Kern), "only kernels can be added to kernels..."
        from add import Add
        return Add([self, other], name=name)

    def __mul__(self, other):
         Here we overload the "*" operator. See self.prod for more information
        return self.prod(other)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: SheffieldML/GPy
Commit Name: 6637eb7ac808851f9902db6ad817e56ca44d0690
Time: 2014-03-18
Author: ibinbei@gmail.com
File Name: GPy/kern/_src/kern.py
Class Name: Kern
Method Name: add


Project Name: SheffieldML/GPy
Commit Name: 47e4026141b0712777eda3713b150f43d2756c11
Time: 2014-02-28
Author: ibinbei@gmail.com
File Name: GPy/kern/_src/kern.py
Class Name: Kern
Method Name: add


Project Name: sympy/sympy
Commit Name: 55f138cf41ded9877f52d0d636a5e291a107c027
Time: 2020-07-13
Author: sachinagarwal0499@gmail.com
File Name: sympy/functions/elementary/trigonometric.py
Class Name:
Method Name: _peeloff_pi