Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a29e26d

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

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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)