Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,18 @@ jobs:
run: |
micromamba create --name TEST python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt --channel conda-forge
micromamba activate TEST
pip install -e . --no-deps --force-reinstall
python -m pip install -e . --no-deps --no-build-isolation --force-reinstall

- name: Debug
shell: bash -l {0}
run: |
micromamba activate TEST
micromamba info --all
micromamba list
python -c "import numpy; print(f'Running numpy {numpy.__version__}')"

- name: Tests
shell: bash -l {0}
run: |
micromamba activate TEST
python -c "import numpy; print(f'Running numpy {numpy.__version__}')"
pytest -s -rxs -v gsw/tests
5 changes: 3 additions & 2 deletions gsw/geostrophy.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ def distance(lon, lat, p=0, axis=-1):
% (lon.shape, axis))
if lon.ndim == 1:
one_d = True
lon = lon[np.newaxis, :]
lat = lat[np.newaxis, :]
# xarray requires expand_dims() rather than [newaxis, :]
lon = np.expand_dims(lon, 0)
lat = np.expand_dims(lat, 0)
axis = -1
else:
one_d = False
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["pip >9.0.1", "setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "oldest-supported-numpy", "build"]
requires = ["pip>9.0.1", "setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "oldest-supported-numpy", "build"]
build-backend = "setuptools.build_meta"