60a342edc8b501802135df44869353cc8604d838,gpytorch/lazy/kronecker_product_lazy_variable.py,KroneckerProductLazyVariable,_matmul_closure_factory,#KroneckerProductLazyVariable#,31

Before Change


            def closure(mat2):
                return sym_kronecker_product_toeplitz_matmul(columns, mat2)

        elif len(args) == 3:
            columns, W_lefts, W_rights = args

            def closure(mat2):
                return kp_interpolated_toeplitz_matmul(columns, mat2, W_lefts, W_rights, None)

        elif len(args) == 4:
            columns, W_lefts, W_rights, added_diag = args

            def closure(mat2):
                return kp_interpolated_toeplitz_matmul(columns, mat2, W_lefts, W_rights, added_diag)

        else:
            raise AttributeError("Invalid number of arguments")

        return closure

    def _derivative_quadratic_form_factory(self, *args):

After Change


        i = 0
        for lazy_var in self.lazy_vars:
            len_repr = len(lazy_var.representation())
            sub_matmul_closure = lazy_var._matmul_closure_factory(*args[i:i + len_repr])
            sub_matmul_closures.append(sub_matmul_closure)
            i = i + len_repr
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: 60a342edc8b501802135df44869353cc8604d838
Time: 2018-01-11
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/kronecker_product_lazy_variable.py
Class Name: KroneckerProductLazyVariable
Method Name: _matmul_closure_factory


Project Name: suavecode/SUAVE
Commit Name: f142fa15ec68e5ea806d4e61a8cfe0a561ef6bce
Time: 2019-09-24
Author: mclarke2@stanford.edu
File Name: trunk/SUAVE/Analyses/Aerodynamics/AVL_Inviscid.py
Class Name: AVL_Inviscid
Method Name: sample_training


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 44f6cac0bbb0d7969ece849cea078c508df7041b
Time: 2019-06-07
Author: slliu96@163.com
File Name: category_encoders/hashing.py
Class Name: HashingEncoder
Method Name: transform