a1a0d2e3010f8ade39317709a684bd431d5eef3c,brian2/units/fundamentalunits.py,Quantity,in_unit,#Quantity#Any#Any#Any#,1051

Before Change


                s = repr(value) + " "
            else:
                s = str(value) + " "
            np.set_printoptions(old_precision)
        if not u.is_dimensionless:
            if isinstance(u, Unit):
                if python_code:
                    s += "* " + repr(u)

After Change


        // scalars, so we use this hackish way of turning the scalar first into
        // an array, then removing the square brackets from the output
        if value.shape == ():
            s = np.array_str(np.array([value]), precision=precision)
            s = s.replace("[", "").replace("]", "").strip()
        else:
            if python_code:
                s = np.array_repr(value, precision=precision)
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: brian-team/brian2
Commit Name: a1a0d2e3010f8ade39317709a684bd431d5eef3c
Time: 2014-10-02
Author: marcel.stimberg@ens.fr
File Name: brian2/units/fundamentalunits.py
Class Name: Quantity
Method Name: in_unit


Project Name: haotianteng/Chiron
Commit Name: 27603242efc13867b6230d377732e7dce7e4c7a0
Time: 2018-08-21
Author: havens.teng@gmail.com
File Name: chiron/chiron_eval.py
Class Name:
Method Name: evaluation


Project Name: yzhao062/pyod
Commit Name: abf37e5b9a3e46d2c9e07e32ee947b4b74e64057
Time: 2018-12-01
Author: zain.nasrullah@ca.pwc.com
File Name: examples/temp_do_not_use_lscp.py
Class Name:
Method Name: