34b8eb46e5de6b760bc131e461755042716e259d,lib/matplotlib/category.py,UnitData,update,#UnitData#Any#,106

Before Change



    def update(self, new_data):
        // so as not to conflict with spdict
        value = max(max(self.locs) + 1, 0)
        self._set_seq_locs(new_data, value)

    def _set_seq_locs(self, data, value):

After Change


            data = [data]

        unsorted_unique = OrderedDict.fromkeys(data)
        for val in unsorted_unique:
            if not isinstance(val, VALID_TYPES):
                raise TypeError("{val!r} is not a string".format(val=val))
            if val not in self._mapping:
                self._mapping[val] = next(self._counter)


// Connects the convertor to matplotlib
units.registry[str] = StrCategoryConverter()
units.registry[np.str_] = StrCategoryConverter()
units.registry[six.text_type] = StrCategoryConverter()
units.registry[bytes] = StrCategoryConverter()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: matplotlib/matplotlib
Commit Name: 34b8eb46e5de6b760bc131e461755042716e259d
Time: 2018-02-07
Author: story645@gmail.com
File Name: lib/matplotlib/category.py
Class Name: UnitData
Method Name: update


Project Name: ilastik/ilastik
Commit Name: a97475e3e52573f9b56242f4bc9197cef7f123cb
Time: 2019-07-10
Author: k-dominik@users.noreply.github.com
File Name: ilastik/applets/tracking/structured/opStructuredTracking.py
Class Name: OpStructuredTracking
Method Name: insertAnnotationsToHypothesesGraph


Project Name: catalyst-cooperative/pudl
Commit Name: e2d9e370df886382d0815f2e68925f8dc49986b0
Time: 2019-05-30
Author: zane.selvans@catalyst.coop
File Name: pudl/extract/ferc1.py
Class Name:
Method Name: extract