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

Before Change


            old_precision = np.get_printoptions()["precision"]
            np.set_printoptions(precision)
            if python_code:
                s = repr(value) + " "
            else:
                s = str(value) + " "
            np.set_printoptions(old_precision)
        if not u.is_dimensionless:

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: 4

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: flow-project/flow
Commit Name: 4956dc485f78ef2b7c5f4a13f8abb7a24cfbb1bb
Time: 2018-09-16
Author: vinitsky.eugene@gmail.com
File Name: flow/scenarios/highway/gen.py
Class Name: HighwayGenerator
Method Name: specify_nodes


Project Name: explosion/thinc
Commit Name: cbe25a5c2909400a88163f1fe85f67e0f2627e98
Time: 2017-01-28
Author: honnibal@gmail.com
File Name: thinc/exceptions.py
Class Name: ExpectedTypeError
Method Name: __init__