cea9099ef36997bc0922e3fdf8c4be88c9910d9a,opt_einsum/contract.py,,format_const_einsum_str,#,501

Before Change



    ins, const_ins = [], []
    for i, term in enumerate(lhs.split(",")):
        (const_ins if i in constants else ins).append(term)

    return "{},[{}]{}{}".format(",".join(ins), ",".join(const_ins), arrow, rhs)

After Change


    formatted_einsum_str = "{}{}{}".format(",".join(wrapped_terms), arrow, rhs)

    // merge adjacent constants
    formatted_einsum_str = formatted_einsum_str.replace("],[", ",")
    return formatted_einsum_str


class ContractExpression:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


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


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


Project Name: nilmtk/nilmtk
Commit Name: 2fae6da1537c67778da075a238d8fb3364cd2471
Time: 2013-12-19
Author: jack-list@xlk.org.uk
File Name: nilmtk/stats/electricity/single.py
Class Name:
Method Name: _indicies_of_periods