Skip to content

Commit

Permalink
Test parsing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
KCGallagher committed Nov 14, 2024
1 parent 5b04ae9 commit 031b8fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion seirmo/plots/_plot_from_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, :]
Expand Down

0 comments on commit 031b8fa

Please sign in to comment.