MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/matplotlib/category.py:170–182  ·  view source on GitHub ↗

Create mapping between unique categorical values and integer ids. Parameters ---------- data : iterable sequence of string values

(self, data=None)

Source from the content-addressed store, hash-verified

168
169class UnitData:
170 def __init__(self, data=None):
171 """
172 Create mapping between unique categorical values and integer ids.
173
174 Parameters
175 ----------
176 data : iterable
177 sequence of string values
178 """
179 self._mapping = OrderedDict()
180 self._counter = itertools.count()
181 if data is not None:
182 self.update(data)
183
184 @staticmethod
185 def _str_is_convertible(val):

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
countMethod · 0.80

Tested by

no test coverage detected