9cb90e08e6feef5b0fd3f6c57128787bcdb85f1e,lib/matplotlib/testing/jpl_units/UnitDblConverter.py,UnitDblConverter,convert,#Any#Any#Any#,72

Before Change



        isNotUnitDbl = True

        if np.iterable(value) and not isinstance(value, str):
            if len(value) == 0:
                return []
            else:
                return [UnitDblConverter.convert(x, unit, axis) for x in value]

        // We need to check to see if the incoming value is actually a
        // UnitDbl and set a flag.  If we get an empty list, then just
        // return an empty list.
        if isinstance(value, U.UnitDbl):
            isNotUnitDbl = False

        // If the incoming value behaves like a number, but is not a UnitDbl,
        // then just return it because we don"t know how to convert it
        // (or it is already converted)

After Change


        // Delay-load due to circular dependencies.
        import matplotlib.testing.jpl_units as U

        if not cbook.is_scalar_or_string(value):
            return [UnitDblConverter.convert(x, unit, axis) for x in value]
        // If the incoming value behaves like a number, but is not a UnitDbl,
        // then just return it because we don"t know how to convert it
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: matplotlib/matplotlib
Commit Name: 9cb90e08e6feef5b0fd3f6c57128787bcdb85f1e
Time: 2019-05-20
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/testing/jpl_units/UnitDblConverter.py
Class Name: UnitDblConverter
Method Name: convert


Project Name: matplotlib/matplotlib
Commit Name: 9cb90e08e6feef5b0fd3f6c57128787bcdb85f1e
Time: 2019-05-20
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/testing/jpl_units/EpochConverter.py
Class Name: EpochConverter
Method Name: convert


Project Name: matplotlib/matplotlib
Commit Name: 9cb90e08e6feef5b0fd3f6c57128787bcdb85f1e
Time: 2019-05-20
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/testing/jpl_units/EpochConverter.py
Class Name: EpochConverter
Method Name: default_units