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

Skip to content

Commit 89a35d8

Browse files
scottshambaughmeeseeksmachine
authored andcommitted
Backport PR #30985: MNT: do not assign a numpy array shape
1 parent df313af commit 89a35d8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/matplotlib/tests/test_axes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,9 +2182,8 @@ def test_pcolor_regression(pd):
21822182

21832183
time_axis, y_axis = np.meshgrid(times, y_vals)
21842184
shape = (len(y_vals) - 1, len(times) - 1)
2185-
z_data = np.arange(shape[0] * shape[1])
2185+
z_data = np.arange(shape[0] * shape[1]).reshape(shape)
21862186

2187-
z_data.shape = shape
21882187
try:
21892188
register_matplotlib_converters()
21902189

0 commit comments

Comments
 (0)