8000 Use category converter on NumPy str/bytes also. · matplotlib/matplotlib@a29e26d · GitHub
[go: up one dir, main page]

Skip to content

Commit a29e26d

Browse files
committed
Use category converter on NumPy str/bytes also.
1 parent 981e0e4 commit a29e26d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/category.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ def _set_seq_locs(self, data, value):
131131
self.locs.append(value)
132132
value += 1
133133

134+
134135
# Connects the convertor to matplotlib
135136
units.registry[str] = StrCategoryConverter()
136-
units.registry[bytes] = StrCategoryConverter()
137+
units.registry[np.str_] = StrCategoryConverter()
137138
units.registry[six.text_type] = StrCategoryConverter()
139+
units.registry[bytes] = StrCategoryConverter()
140+
units.registry[np.bytes_] = StrCategoryConverter()

0 commit comments

Comments
 (0)
0