cdf7a78f61adc84cff1de0d6bad9d54c263c598c,opt_einsum/contract.py,,_core_contract,#,426
Before Change
// Start contraction loop
for num, contraction in enumerate(contraction_list):
inds, idx_rm, einsum_str, remaining, blas_flag = contraction
tmp_operands = []
for x in inds:
tmp_operands.append(operands.pop(x))
// Do we need to deal with the output?
handle_out = specified_out and ((num + 1) == len(contraction_list))
After Change
// check if we are performing the pre-pass of an expression with constants
if parse_constants:
// if so, keep contracting until we find any non-constant operators, then break out
operands_copy = list(operands)
if any(operands_copy.pop(x) is None for x in inds):
return operands, contraction_list[num:]
tmp_operands = [operands.pop(x) for x in inds]
// Do we need to deal with the output?
handle_out = specified_out and ((num + 1) == len(contraction_list))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: dgasmith/opt_einsum
Commit Name: cdf7a78f61adc84cff1de0d6bad9d54c263c598c
Time: 2018-07-21
Author: john.gray.14@ucl.ac.uk
File Name: opt_einsum/contract.py
Class Name:
Method Name: _core_contract
Project Name: commonsense/conceptnet5
Commit Name: b4d5c80c83ec0502231ff3563fa8ac5b95717267
Time: 2017-06-14
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/transforms.py
Class Name:
Method Name: make_replacements
Project Name: raghakot/keras-vis
Commit Name: 9f221345e7a58804e347f2a1879b06922222413b
Time: 2017-07-03
Author: ragha@outlook.com
File Name: docs/md_autogen.py
Class Name: MarkdownAPIGenerator
Method Name: module2md