Skip to content

Commit fa2accc

Browse files
committed
Change .reshape((-1)) to .reshape(-1)
remove white space
1 parent 369ba34 commit fa2accc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/matplotlib/colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def _to_rgba_no_colorcycle(c, alpha=None):
268268
# turn 2-D array into 1-D array
269269
if isinstance(c, np.ndarray):
270270
if c.ndim == 2 and c.shape[0] == 1:
271-
c = c.reshape((-1))
271+
c = c.reshape(-1)
272272
# tuple color.
273273
if not np.iterable(c):
274274
raise ValueError(f"Invalid RGBA argument: {orig_c!r}")

lib/matplotlib/tests/test_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6590,7 +6590,7 @@ def test_sharing_does_not_link_positions():
65906590
init_pos = ax1.get_position()
65916591
fig.subplots_adjust(left=0)
65926592
assert (ax1.get_position().get_points() == init_pos.get_points()).all()
6593-
6593+
65946594

65956595
@check_figures_equal(extensions=["pdf"])
65966596
def test_2dcolor_plot(fig_test, fig_ref):

lib/matplotlib/tests/test_colors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,8 +1211,8 @@ def test_colormap_bad_data_with_alpha():
12111211
assert_array_equal(c[0, 0], (0, 0, 0, 0))
12121212
c = cmap([[np.nan, 0.5], [0, 0]], alpha=np.full((2, 2), 0.5))
12131213
assert_array_equal(c[0, 0], (0, 0, 0, 0))
1214-
1215-
1214+
1215+
12161216
def test_2d_to_rgba():
12171217
color = np.array([0.1, 0.2, 0.3])
12181218
rgba_1d = mcolors.to_rgba(color.reshape(-1))

0 commit comments

Comments
 (0)