81ce5ee9a1590e7b4154e72dca54c33ad27b6d89,opt_einsum/contract.py,ContractExpression,__init__,#ContractExpression#Any#Any#Any#,525

Before Change



        // perform as much of the contraction as possible if constants supplied
        if constants_dict:
            tmp_const_ops = [constants_dict.get(i, None) for i in range(self.num_args)]
            new_ops, new_contraction_list = self(*tmp_const_ops, parse_constants=True)
            self.contraction = format_const_einsum_str(contraction, constants_dict.keys())
            self.num_args -= len(constants_dict)
            self.contraction_list = new_contraction_list

After Change


        self.contraction_list = contraction_list
        self.einsum_kwargs = einsum_kwargs

        self._full_num_args = contraction.count(",") + 1
        self.num_args = self._full_num_args - len(constants_dict)

        self.contraction = format_const_einsum_str(contraction, constants_dict.keys())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: dgasmith/opt_einsum
Commit Name: 81ce5ee9a1590e7b4154e72dca54c33ad27b6d89
Time: 2018-07-21
Author: john.gray.14@ucl.ac.uk
File Name: opt_einsum/contract.py
Class Name: ContractExpression
Method Name: __init__


Project Name: chakki-works/doccano
Commit Name: 70b63b68ee62d5c4815d321d4e1b2a8f1c5fed54
Time: 2020-01-06
Author: clewolff@microsoft.com
File Name: app/api/tests/test_api.py
Class Name: TestDocumentListAPI
Method Name: test_do_not_return_docs_of_other_projects


Project Name: geekcomputers/Python
Commit Name: c90c7f8e22c710729193604b55b144e2c04025c5
Time: 2017-01-18
Author: Pren0724@stthomas.edu
File Name: CountMillionCharacter.py
Class Name:
Method Name:


Project Name: ray-project/ray
Commit Name: 75dfae84e40d62124b3622da07f06ff1cc26d496
Time: 2021-03-19
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/backend_state.py
Class Name: BackendState
Method Name: _completed_goals