Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Test against latest NumPy #221

Merged
merged 14 commits into from
Jun 14, 2024
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
test:

runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
# We test NumPy dev on 3.11
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
requires: ['requirements.txt']
include:
Expand All @@ -37,9 +39,13 @@ jobs:
allow-prereleases: true
- name: Install
run: |
set -eo pipefail
python -m pip install --upgrade pip
python -m pip install -r ${{ matrix.requires }}
python -m pip install -r requirements-dev.txt
if [[ "${{ matrix.python-version }}" == "3.11" ]]; then
python -m pip install --only-binary numpy --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple "numpy>=2.1.0.dev0"
fi
python -m pip install .
- name: Lint
run: |
Expand Down
2 changes: 1 addition & 1 deletion nitime/algorithms/event_related.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def fir(timeseries, design):
"""
r"""
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Takes care of

  nitime/algorithms/event_related.py:13: SyntaxWarning: invalid escape sequence '\h'

Calculate the FIR (finite impulse response) HRF, according to [Burock2000]_

Parameters
Expand Down
6 changes: 2 additions & 4 deletions nitime/algorithms/tests/test_spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,7 @@ def test_mtm_lin_combo():
mtm_cross = tsa.mtm_cross_spectrum(
spec1, spec2, (weights[0], weights[1]), sides=sides
)
npt.assert_(mtm_cross.dtype in np.sctypes['complex'],
'Wrong dtype for crossspectrum')
assert mtm_cross.dtype == np.complex128, 'Wrong dtype for crossspectrum'
npt.assert_(len(mtm_cross) == 51,
'Wrong length for halfband spectrum')
sides = 'twosided'
Expand All @@ -260,8 +259,7 @@ def test_mtm_lin_combo():
mtm_auto = tsa.mtm_cross_spectrum(
spec1, spec1, weights[0], sides=sides
)
npt.assert_(mtm_auto.dtype in np.sctypes['float'],
'Wrong dtype for autospectrum')
assert mtm_auto.dtype == np.float64, 'Wrong dtype for autospectrum'
npt.assert_(len(mtm_auto) == 51,
'Wrong length for halfband spectrum')
sides = 'twosided'
Expand Down
Loading