81ce5ee9a1590e7b4154e72dca54c33ad27b6d89,opt_einsum/contract.py,ContractExpression,__init__,#ContractExpression#Any#Any#Any#,525
Before Change
self.contraction = contraction
self.contraction_list = contraction_list
self.einsum_kwargs = einsum_kwargs
self.num_args = len(contraction_list[0][0]) + len(contraction_list[0][3]) - 1
self.constants = None
// 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
self.constants = new_ops
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())
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
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: MTG/freesound
Commit Name: f3dbb6069630079f5f82d3325f8129b1ee2ecaec
Time: 2018-05-24
Author: frederic.font@upf.edu
File Name: general/management/commands/report_count_statuses.py
Class Name: Command
Method Name: handle
Project Name: mindsdb/mindsdb
Commit Name: 18c5aea1a31a366d9824d00296b3f4a366dd3930
Time: 2020-08-27
Author: stpmax@yandex.ru
File Name: mindsdb/api/mysql/mysql_proxy/mysql_proxy.py
Class Name: MysqlProxy
Method Name: answer_stmt_prepare
Project Name: idaholab/raven
Commit Name: 5c0409d9e0ccffa34d663f363da358658318d3c4
Time: 2017-10-18
Author: congjian.wang@inl.gov
File Name: framework/JobHandler.py
Class Name: JobHandler
Method Name: availability