Skip to content

Commit 77dbccc

Browse files
committed
Remove old to_array method
1 parent 3a42131 commit 77dbccc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/matplotlib/category.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
import matplotlib.ticker as ticker
1515

1616

17-
def to_array(data, maxlen=100):
18-
return np.array(data, dtype=np.unicode)
19-
20-
2117
class StrCategoryConverter(units.ConversionInterface):
2218
@staticmethod
2319
def convert(value, unit, axis):
@@ -29,7 +25,7 @@ def convert(value, unit, axis):
2925
if isinstance(value, six.string_types):
3026
return vmap[value]
3127

32-
vals = to_array(value)
28+
vals = np.array(value, dtype=np.unicode)
3329
for lab, loc in vmap.items():
3430
vals[vals == lab] = loc
3531

@@ -105,7 +101,7 @@ def update(self, new_data):
105101

106102
def _set_seq_locs(self, data, value):
107103
# magic to make it work under np1.6
108-
strdata = to_array(data)
104+
strdata = np.array(data, dtype=np.unicode)
109105
# np.unique makes dateframes work
110106
new_s = [d for d in np.unique(strdata) if d not in self.seq]
111107
for ns in new_s:

0 commit comments

Comments
 (0)