From 031b8fad30bcdcc253f268b37b40f1e7d9b7f260 Mon Sep 17 00:00:00 2001 From: Kit Gallagher Date: Thu, 14 Nov 2024 15:40:07 -0500 Subject: [PATCH] Test parsing errors --- .github/workflows/unit-tests.yml | 2 +- seirmo/plots/_plot_from_numpy.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 019369d..b914e57 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, 3.10, 3.11, 3.12] + python-version: [3.8, 3.9, 3.11, 3.12] steps: - uses: actions/checkout@v2 diff --git a/seirmo/plots/_plot_from_numpy.py b/seirmo/plots/_plot_from_numpy.py index 8fe85f1..79e5f7d 100644 --- a/seirmo/plots/_plot_from_numpy.py +++ b/seirmo/plots/_plot_from_numpy.py @@ -84,7 +84,8 @@ def add_data_to_plot( be plotted on a second x axis""" if len(data_array.shape) == 1: # Turn any 1D input into 2D - if not isinstance(times, np.ndarray) or np.sum(np.shape(times)) == 1: + if (not isinstance(times, np.ndarray) + or np.sum(np.shape(times)) == 1): # I.e. if only one np.int, or one element array times = np.array(times, ndmin=2) data_array = data_array[np.newaxis, :]