From aff20cf00c41e61ee7b72fdd803a8b389530e076 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 8 Jul 2025 03:02:36 -0400 Subject: [PATCH] ci: Fix image preload with multiple conflicts --- .github/workflows/tests.yml | 4 ++-- azure-pipelines.yml | 4 ++-- lib/matplotlib/mlab.py | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 53d47346c6eb..7c27ec84f86a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -107,8 +107,8 @@ jobs: lib/matplotlib/tests/baseline_images \ lib/mpl_toolkits/*/tests/baseline_images) if [ -n "${conflicts}" ]; then - git checkout --ours -- "${conflicts}" - git add -- "${conflicts}" + git checkout --ours -- ${conflicts} + git add -- ${conflicts} fi # If committing fails, there were conflicts other than the baseline images, # which should not be allowed to happen, and should fail the build. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a5a0e965e97b..eef71162f9cb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -79,8 +79,8 @@ stages: lib/matplotlib/tests/baseline_images \ lib/mpl_toolkits/*/tests/baseline_images) if [ -n "${conflicts}" ]; then - git checkout --ours -- "${conflicts}" - git add -- "${conflicts}" + git checkout --ours -- ${conflicts} + git add -- ${conflicts} fi # If committing fails, there were conflicts other than the baseline images, # which should not be allowed to happen, and should fail the build. diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py index b4b4c3f96828..de890935c23b 100644 --- a/lib/matplotlib/mlab.py +++ b/lib/matplotlib/mlab.py @@ -219,9 +219,6 @@ def _stride_windows(x, n, noverlap=0): raise ValueError(f'n ({n}) and noverlap ({noverlap}) must be positive integers ' f'with n < noverlap and n <= x.size ({x.size})') - if n == 1 and noverlap == 0: - return x[np.newaxis] - step = n - noverlap shape = (n, (x.shape[-1]-noverlap)//step) strides = (x.strides[0], step*x.strides[0])