Skip to content

Commit 7997b19

Browse files
committed
Update exception string to use %r for formatting
1 parent 72f6359 commit 7997b19

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4777,8 +4777,8 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
47774777

47784778
for name, array in [('x', x), ('y1', y1), ('y2', y2)]:
47794779
if array.ndim > 1:
4780-
raise ValueError('Input passed into argument "' + name +
4781-
'" is not 1-dimensional.')
4780+
raise ValueError('Input passed into argument "%r"' % name +
4781+
'is not 1-dimensional.')
47824782

47834783
if y1.ndim == 0:
47844784
y1 = np.ones_like(x) * y1
@@ -4941,10 +4941,10 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
49414941
x1 = ma.masked_invalid(self.convert_xunits(x1))
49424942
x2 = ma.masked_invalid(self.convert_xunits(x2))
49434943

4944-
for array in [('x', x), ('y1', y1), ('y2', y2)]:
4945-
if array[1].ndim > 1:
4946-
raise ValueError('Input passed into argument "' + array[0] +
4947-
'" is not 1-dimensional.')
4944+
for name, array in [('y', y), ('x1', x1), ('x2', x2)]:
4945+
if array.ndim > 1:
4946+
raise ValueError('Input passed into argument "%r"' % name +
4947+
'is not 1-dimensional.')
49484948

49494949
if x1.ndim == 0:
49504950
x1 = np.ones_like(y) * x1

0 commit comments

Comments
 (0)