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

Skip to content

Commit f0736c1

Browse files
authored
Merge pull request #8485 from kalagau/TeamDoItTomorrowfix-8057
FIX: markevery to accept builtin integers and numpy integers
2 parents 413421d + 894ccd4 commit f0736c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/lines.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ def _slice_or_none(in_v, slc):
143143
# if just an int, assume starting at 0 and make a tuple
144144
elif isinstance(markevery, int):
145145
markevery = (0, markevery)
146+
# if just an numpy int, assume starting at 0 and make a tuple
147+
elif isinstance(markevery, np.integer):
148+
markevery = (0, markevery.item())
146149

147150
if isinstance(markevery, tuple):
148151
if len(markevery) != 2:

0 commit comments

Comments
 (0)