Skip to content

Commit ec6ce6b

Browse files
committed
Use explicit string check
1 parent d56f73e commit ec6ce6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/style/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import re
1515
import contextlib
1616

17-
import numpy as np
1817
import matplotlib as mpl
18+
from matplotlib import cbook
1919

2020

2121
__all__ = ['use', 'context', 'available', 'library', 'reload_library']
@@ -44,7 +44,7 @@ def use(name):
4444
style names, see `style.available`. If given a list, each style is
4545
applied from first to last in the list.
4646
"""
47-
if np.isscalar(name):
47+
if cbook.is_string_like(name):
4848
name = [name]
4949

5050
for style in name:

0 commit comments

Comments
 (0)