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

Skip to content

Commit c8b4dfb

Browse files
committed
Check if marker symbol is hashable
This is a better expression of intent for a change introduced in commit #2e5f5ff.
1 parent 3db87c6 commit c8b4dfb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/markers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"""
130130
import copy
131131

132-
from collections.abc import Sized
132+
from collections.abc import Hashable, Sized
133133

134134
import numpy as np
135135

@@ -308,7 +308,7 @@ def _set_marker(self, marker):
308308
"""
309309
if isinstance(marker, str) and cbook.is_math_text(marker):
310310
self._marker_function = self._set_mathtext_path
311-
elif isinstance(marker, (int, str, np.integer)) and marker in self.markers:
311+
elif isinstance(marker, Hashable) and marker in self.markers:
312312
self._marker_function = getattr(self, '_set_' + self.markers[marker])
313313
elif (isinstance(marker, np.ndarray) and marker.ndim == 2 and
314314
marker.shape[1] == 2):

0 commit comments

Comments
 (0)