[med-svn] [Git][med-team/nitime][upstream] New upstream version 0.11
Michael R. Crusoe (@crusoe)
gitlab at salsa.debian.org
Sun Sep 22 14:15:43 BST 2024
Michael R. Crusoe pushed to branch upstream at Debian Med / nitime
Commits:
9fca4c0d by Michael R. Crusoe at 2024-09-22T14:20:37+02:00
New upstream version 0.11
- - - - -
25 changed files:
- .git_archival.txt
- + .github/workflows/codespell.yml
- .github/workflows/test.yml
- .github/workflows/wheels.yml
- doc/conf.py
- doc/discussion/interval_object.rst
- doc/discussion/multitaper_jackknife.rst
- doc/discussion/time_series_access.rst
- doc/examples/filtering_fmri.py
- doc/examples/multi_taper_spectral_estimation.py
- doc/users/overview.rst
- nitime/__init__.py
- nitime/algorithms/autoregressive.py
- nitime/algorithms/event_related.py
- nitime/algorithms/tests/test_autoregressive.py
- nitime/algorithms/tests/test_spectral.py
- nitime/analysis/coherence.py
- nitime/analysis/event_related.py
- nitime/index_utils.py
- nitime/tests/test_timeseries.py
- nitime/tests/test_utils.py
- nitime/timeseries.py
- nitime/utils.py
- nitime/viz.py
- pyproject.toml
Changes:
=====================================
.git_archival.txt
=====================================
@@ -1,4 +1,4 @@
-node: 1dc1d22c239664e2cba9756f61d86bd7467d5d5a
-node-date: 2023-10-02T11:16:01-07:00
-describe-name: 0.10.2
-ref-names: HEAD -> master, tag: 0.10.2
+node: dd505830dd890b477414a0dad8f587235010bf9c
+node-date: 2024-06-14T07:59:20-07:00
+describe-name: 0.11
+ref-names: tag: 0.11
=====================================
.github/workflows/codespell.yml
=====================================
@@ -0,0 +1,22 @@
+---
+name: Codespell
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+permissions:
+ contents: read
+
+jobs:
+ codespell:
+ name: Check for spelling errors
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout at v3
+ - name: Codespell
+ uses: codespell-project/actions-codespell at v2
=====================================
.github/workflows/test.yml
=====================================
@@ -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:
@@ -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: |
=====================================
.github/workflows/wheels.yml
=====================================
@@ -58,13 +58,21 @@ jobs:
fail-fast: false
matrix:
buildplat:
- - [ubuntu-20.04, musllinux_x86_64]
- - [macos-12, macosx_*]
- - [windows-2019, win_amd64]
+ - [ubuntu-latest, musllinux_x86_64]
+ - [ubuntu-latest, manylinux_aarch64]
+ - [macos-13, macosx_x86_64] # native Intel hardware
+ - [windows-latest, win_amd64]
python: ["cp38", "cp39", "cp310", "cp311", "cp312"]
+ # No NumPy wheels on 3.8 aarch64 or musl
+ exclude:
+ - buildplat: [ubuntu-latest, manylinux_aarch64]
+ python: "cp38"
+ - buildplat: [ubuntu-latest, musllinux_x86_64]
+ python: "cp38"
include:
- # Manylinux builds are cheap, do all in one
- - { buildplat: ["ubuntu-20.04", "manylinux_x86_64"], python: "*" }
+ # Manylinux and arm64 builds (on native hardware) are cheap, do all in one
+ - { buildplat: ["ubuntu-latest", "manylinux_x86_64"], python: "*" }
+ - { buildplat: ["macos-14", "macosx_arm64"], python: "*" }
steps:
- uses: actions/checkout at v3
@@ -76,6 +84,13 @@ jobs:
- name: Update pip/pipx
run: pip install --upgrade pip pipx
+ # For aarch64 support
+ # https://cibuildwheel.pypa.io/en/stable/faq/#emulation
+ - uses: docker/setup-qemu-action at v3
+ with:
+ platforms: all
+ if: runner.os == 'Linux' && endsWith(matrix.buildplat[1], 'aarch64')
+
- name: Build wheel(s)
run: pipx run --spec "cibuildwheel>=2.15" cibuildwheel
env:
=====================================
doc/conf.py
=====================================
@@ -94,12 +94,12 @@ copyright = u'2009, Neuroimaging in Python team'
# We read the version info from the source file.
ver = {}
-ver_file = os.path.join('..', 'nitime', 'version.py')
+ver_file = os.path.join('..', 'nitime', '_version.py')
with open(ver_file) as f:
exec(f.read())
# The short X.Y version.
-version = '%s.%s' % (_version_major, _version_minor)
+version = '%s.%s' % (version_tuple[0], version_tuple[1])
# The full version, including alpha/beta/rc tags.
release = __version__
=====================================
doc/discussion/interval_object.rst
=====================================
@@ -49,7 +49,7 @@ consistent, in the same manner that is already implemented in
represent a time offset, relative to the attributes :attr:`t_start` and
:attr:`t_stop`. That is, it can tell us where relative to these two
time-points some interesting even, which this interval surrounds, or this
- interval is close to, occurs. This can be used in order to interpert how
+ interval is close to, occurs. This can be used in order to interpret how
time-series access is done using the :class:`TimeInterval` object. See
:ref:`time_series_access`. This attribute can be implemented as an optional
input on initialization, such that it defaults to be equal to
=====================================
doc/discussion/multitaper_jackknife.rst
=====================================
@@ -16,7 +16,7 @@ General JN definitions
| **pseudovalues**
| :math:`\hat{\theta}_i = n\hat{\theta} - (n-1)\hat{\theta}_{-i}`
-Now the jackknifed esimator is computed as
+Now the jackknifed estimator is computed as
:math:`\tilde{\theta} = \dfrac{1}{n}\sum_i \hat{\theta}_i = n\hat{\theta} - \dfrac{n-1}{n}\sum_i \hat{\theta}_{-i}`
=====================================
doc/discussion/time_series_access.rst
=====================================
@@ -47,7 +47,7 @@ smaller.
~~~~~~~~~~~~~~~~~~~~
:func:`ut.index_at` returns the indices of the values in the array that are
-the largest time values, smaller thatn the input values t. That is, it returns i
+the largest time values, smaller than the input values t. That is, it returns i
for which $t_i$ is the maximal one, which still fulfills: $t_i<t$.
Questions
@@ -56,7 +56,7 @@ The following questions apply to all three cases:
* what happens when the t is smaller than the smallest entry in the array
return None?
-* what happens when t is larget than the last entry in the time array? return
+* what happens when t is larger than the last entry in the time array? return
None?
:func:`at`
=====================================
doc/examples/filtering_fmri.py
=====================================
@@ -242,7 +242,7 @@ attenuation within the stop-bands.
We can do that by initializng a SpectralAnalyzer for each one of the filtered
time-series resulting from the above operation and plotting their spectra. For
ease of compariso, we only plot the spectra using the multi-taper spectral
-estimation. At the level of granularity provided by this method, the diferences
+estimation. At the level of granularity provided by this method, the differences
between the methods are emphasized:
"""
=====================================
doc/examples/multi_taper_spectral_estimation.py
=====================================
@@ -117,7 +117,7 @@ winspect(sig.barthann(npts), fig02, 'Modified Bartlett-Hann')
.. image:: fig/multi_taper_spectral_estimation_02.png
As before, the left figure displays the windowing function in the temporal
-domain and the figure on the left displays the attentuation of spectral leakage
+domain and the figure on the left displays the attenuation of spectral leakage
in the other frequency bands in the spectrum. Notice that though different
windowing functions have different spectral attenuation profiles, trading off
attenuation of leakage from frequency bands near the frequency of interest
@@ -302,7 +302,7 @@ fig06 = plot_spectral_estimate(freqs, psd, (adaptive_psd_mt,), hyp_limits,
.. image:: fig/multi_taper_spectral_estimation_06.png
-As metioned above, in addition to estimating the spectrum itself, an estimate
+As mentioned above, in addition to estimating the spectrum itself, an estimate
of the confidence interval of the spectrum can be generated using a
jack-knifing procedure [Thomson2007]_.
@@ -394,7 +394,7 @@ References
.. [Welch1967] P.D. Welch (1967), The use of the fast fourier transform for the
estimation of power spectra: a method based on time averaging
- over short modified periodograms. IEEE Transcations on Audio and
+ over short modified periodograms. IEEE Transactions on Audio and
Electroacoustics.
.. [Slepian1978] Slepian, D. Prolate spheroidal wave functions, Fourier
=====================================
doc/users/overview.rst
=====================================
@@ -67,7 +67,7 @@ object does not trigger any intensive computations. Instead the computation of
the attributes of analyzer objects is delayed until the moment the user calls
these attributes. In addition, once a computation is triggered it is stored as
an attribute of the object, which assures that accessing the results of an
-analysis will trigger the computation only on the first time the analysis resut
+analysis will trigger the computation only on the first time the analysis result
is required. Thereafter, the result of the analysis is stored for further use
of this result.
=====================================
nitime/__init__.py
=====================================
@@ -13,7 +13,7 @@ The module has several sub-modules:
- ``analysis``: Contains *Analyzer* objects, which implement particular
analysis methods on the time-series objects
-- ``viz``: Vizualization
+- ``viz``: Visualization
All of the sub-modules will be imported as part of ``__init__``, so that users
have all of these things at their fingertips.
=====================================
nitime/algorithms/autoregressive.py
=====================================
@@ -289,7 +289,7 @@ def AR_psd(ak, sigma_v, n_freqs=1024, sides='onesided'):
Returns
-------
(w, ar_psd)
- w : Array of normalized frequences from [-.5, .5) or [0,.5]
+ w : Array of normalized frequencies from [-.5, .5) or [0,.5]
ar_psd : A PSD estimate computed by sigma_v / |1-a(f)|**2 , where
a(f) = DTFT(ak)
=====================================
nitime/algorithms/event_related.py
=====================================
@@ -10,7 +10,7 @@ from nitime.lazy import scipy_fftpack as fftpack
def fir(timeseries, design):
- """
+ r"""
Calculate the FIR (finite impulse response) HRF, according to [Burock2000]_
Parameters
@@ -84,7 +84,7 @@ def freq_domain_xcorr(tseries, events, t_before, t_after, Fs=1):
-------
xcorr: float array
The correlation function between the tseries and the events. Can be
- interperted as a linear filter from events to responses (the
+ interpreted as a linear filter from events to responses (the
time-series) of an LTI.
"""
@@ -125,9 +125,9 @@ def freq_domain_xcorr_zscored(tseries, events, t_before, t_after, Fs=1):
-------
xcorr: float array
The correlation function between the tseries and the events. Can be
- interperted as a linear filter from events to responses (the
+ interpreted as a linear filter from events to responses (the
time-series) of an LTI. Because it is normalized to its own mean and
- variance, it can be interperted as measuring statistical significance
+ variance, it can be interpreted as measuring statistical significance
relative to all time-shifted versions of the events.
"""
=====================================
nitime/algorithms/tests/test_autoregressive.py
=====================================
@@ -61,7 +61,7 @@ def test_AR_LD():
"""
Test the Levinson Durbin estimate of the AR coefficients against the
- expercted PSD
+ expected PSD
"""
arsig, _, _ = utils.ar_generator(N=512)
=====================================
nitime/algorithms/tests/test_spectral.py
=====================================
@@ -94,7 +94,7 @@ def test_get_spectra_complex():
def test_get_spectra_unknown_method():
"""
- Test that providing an unknown method to get_spectra rasies a ValueError
+ Test that providing an unknown method to get_spectra raises a ValueError
"""
tseries = np.array([[1, 2, 3], [4, 5, 6]])
@@ -179,7 +179,7 @@ def test_dpss_properties():
N = 2000
NW = 200
d, lam = tsa.dpss_windows(N, NW, 2*NW-2)
- # 2NW-2 lamdas should be all > 0.9
+ # 2NW-2 lambdas should be all > 0.9
npt.assert_(
(lam > 0.9).all(), 'Eigenvectors show poor spectral concentration'
)
@@ -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'
@@ -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'
=====================================
nitime/analysis/coherence.py
=====================================
@@ -28,7 +28,7 @@ class CoherenceAnalyzer(BaseAnalyzer):
method : dict, optional,
This is the method used for spectral analysis of the signal for the
- coherence caclulation. See :func:`algorithms.get_spectra`
+ coherence calculation. See :func:`algorithms.get_spectra`
documentation for details.
unwrap_phases : bool, optional
@@ -167,7 +167,7 @@ class CoherenceAnalyzer(BaseAnalyzer):
""" The frequency-dependent phase relationship between all the pairwise
combinations of time-series in the data"""
- #XXX calcluate this from the standard output, instead of recalculating:
+ #XXX calculate this from the standard output, instead of recalculating:
tseries_length = self.input.data.shape[0]
spectrum_length = self.spectrum.shape[-1]
@@ -693,7 +693,7 @@ class SeedCoherenceAnalyzer(object):
cache['FFT_conj_slices'][-1] = \
seed_cache['FFT_conj_slices'][0]
- #This performs the caclulation for this seed:
+ #This performs the calculation for this seed:
Cxy[seed_idx] = tsa.cache_to_coherency(cache, ij)
#In the case where there is only one channel in the seed time-series:
=====================================
nitime/analysis/event_related.py
=====================================
@@ -228,7 +228,7 @@ class EventRelatedAnalyzer(desc.ResetMixin):
def et_data(self):
"""The event-triggered data (all occurrences).
- This gets the time-series corresponding to the inidividual event
+ This gets the time-series corresponding to the individual event
occurrences. Returns a list of lists of time-series. The first dimension
is the different channels in the original time-series data and the
second dimension is each type of event in the event time series
=====================================
nitime/index_utils.py
=====================================
@@ -6,11 +6,11 @@ __all__ = ['tri', 'triu', 'tril', 'mask_indices', 'tril_indices',
'tril_indices_from', 'triu_indices', 'triu_indices_from',
]
-from numpy.core.numeric import asanyarray, subtract, arange, \
+from numpy import asanyarray, subtract, arange, \
greater_equal, multiply, ones, asarray, where
-# Need to import numpy for the doctests!
-import numpy as np
+# Need to import numpy for the doctests!
+import numpy as np
def tri(N, M=None, k=0, dtype=float):
"""
=====================================
nitime/tests/test_timeseries.py
=====================================
@@ -207,7 +207,7 @@ def test_TimeArray_convert_unit():
def test_TimeArray_div():
- #divide singelton by singleton:
+ #divide singleton by singleton:
a = 2.0
b = 6.0
time1 = ts.TimeArray(a, time_unit='s')
@@ -217,7 +217,7 @@ def test_TimeArray_div():
div2 = time1 / time2
npt.assert_equal(div1, div2)
- #Divide a TimeArray by a singelton:
+ #Divide a TimeArray by a singleton:
a = np.array([1, 2, 3])
b = 6.0
time1 = ts.TimeArray(a, time_unit='s')
@@ -500,7 +500,7 @@ def test_TimeSeries():
tseries3 = ts.TimeSeries(data=[1, 2, 3, 4], sampling_rate=1000,
time_unit='ms')
#you can specify the sampling_rate or the sampling_interval, to the same
- #effect, where specificying the sampling_interval is in the units of that
+ #effect, where specifying the sampling_interval is in the units of that
#time-series:
tseries4 = ts.TimeSeries(data=[1, 2, 3, 4], sampling_interval=1,
time_unit='ms')
@@ -534,7 +534,7 @@ def test_TimeSeries():
with pytest.raises(ValueError) as e_info:
ts.TimeSeries(dict(data=data, time=t))
- # test basic arithmetics with TimeSeries
+ # test basic arithmetic with TimeSeries
tseries1 = ts.TimeSeries([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], sampling_rate=1)
tseries2 = tseries1 + 1
npt.assert_equal(tseries1.data + 1, tseries2.data)
@@ -916,16 +916,20 @@ def test_index_int64():
assert repr(b[0]) == repr(b[np.int32(0)])
-def test_timearray_math_functions():
+ at pytest.mark.parametrize('f', ['min', 'max', 'mean', 'ptp', 'sum'])
+ at pytest.mark.parametrize('tu', ['s', 'ms', 'ps', 'D'])
+def test_timearray_math_functions(f, tu):
"Calling TimeArray.min() .max(), mean() should return TimeArrays"
a = np.arange(2, 11)
- for f in ['min', 'max', 'mean', 'ptp', 'sum']:
- for tu in ['s', 'ms', 'ps', 'D']:
- b = ts.TimeArray(a, time_unit=tu)
- npt.assert_(getattr(b, f)().__class__ == ts.TimeArray)
- npt.assert_(getattr(b, f)().time_unit == b.time_unit)
- # comparison with unitless should convert to the TimeArray's units
- npt.assert_(getattr(b, f)() == getattr(a, f)())
+ b = ts.TimeArray(a, time_unit=tu)
+ if f == "ptp" and ts._NP_2:
+ want = np.ptp(a)
+ else:
+ want = getattr(a, f)()
+ npt.assert_(getattr(b, f)().__class__ == ts.TimeArray)
+ npt.assert_(getattr(b, f)().time_unit == b.time_unit)
+ # comparison with unitless should convert to the TimeArray's units
+ npt.assert_(getattr(b, f)() == want)
def test_timearray_var_prod():
=====================================
nitime/tests/test_utils.py
=====================================
@@ -230,6 +230,8 @@ def test_detect_lines():
"""
Tests detect_lines utility in the reliable low-SNR scenario.
"""
+ np.random.seed(0)
+
N = 1000
fft_pow = int( np.ceil(np.log2(N) + 2) )
NW = 4
@@ -286,19 +288,21 @@ def test_detect_lines_2dmode():
Test multi-sequence operation
"""
+ # This seed affects not just the signal we generate below, but then also
+ # detect_lines->dpss_windows->tridi_inverse_iteration
+ np.random.seed(0)
+
N = 1000
sig = np.cos( 2*np.pi*np.arange(N) * 20./N ) + np.random.randn(N) * .01
- sig2d = np.row_stack( (sig, sig, sig) )
+ sig2d = np.vstack( (sig, sig, sig) )
lines = utils.detect_lines(sig2d, (4, 8), low_bias=True, NFFT=2**12)
npt.assert_(len(lines)==3, 'Detect lines failed multi-sequence mode')
- consistent1 = (lines[0][0] == lines[1][0]).all() and \
- (lines[1][0] == lines[2][0]).all()
- consistent2 = (lines[0][1] == lines[1][1]).all() and \
- (lines[1][1] == lines[2][1]).all()
-
- npt.assert_(consistent1 and consistent2, 'Inconsistent results')
+ npt.assert_allclose(lines[0][0], lines[1][0])
+ npt.assert_allclose(lines[0][0], lines[2][0])
+ npt.assert_allclose(lines[0][1], lines[1][1])
+ npt.assert_allclose(lines[0][1], lines[2][1])
=====================================
nitime/timeseries.py
=====================================
@@ -33,6 +33,11 @@ import numpy as np
# Our own
from nitime import descriptors as desc
+try:
+ _NP_2 = int(np.__version__.split(".")[0]) >= 2
+except Exception:
+ _NP_2 = True
+
#-----------------------------------------------------------------------------
# Module globals
#-----------------------------------------------------------------------------
@@ -112,7 +117,9 @@ class TimeArray(np.ndarray, TimeInterface):
which are SI units of time. Default: 's'
copy : bool, optional
- Whether to create this instance by copy of a
+ Whether to create this instance by copy of a. If False,
+ a copy will not be forced but might still be required depending
+ on the data array.
Note
----
@@ -152,7 +159,7 @@ class TimeArray(np.ndarray, TimeInterface):
e_s += 'TimeArray in object, or int64 times, in %s' % base_unit
raise ValueError(e_s)
- time = np.array(data, copy=False)
+ time = np.asarray(data)
else:
if isinstance(data, TimeInterface):
time = data.copy()
@@ -309,7 +316,11 @@ class TimeArray(np.ndarray, TimeInterface):
return ret
def ptp(self, *args, **kwargs):
- ret = TimeArray(np.ndarray.ptp(self, *args, **kwargs),
+ if _NP_2:
+ ptp = np.ptp
+ else:
+ ptp = np.ndarray.ptp
+ ret = TimeArray(ptp(self, *args, **kwargs),
time_unit=base_unit)
ret.convert_unit(self.time_unit)
return ret
=====================================
nitime/utils.py
=====================================
@@ -188,11 +188,11 @@ def circularize(x, bottom=0, top=2 * np.pi, deg=False):
bottom : float, optional (defaults to 0).
If you want to set the bottom of the interval into which you
- modulu to something else than 0.
+ modulo to something else than 0.
top : float, optional (defaults to 2*pi).
If you want to set the top of the interval into which you
- modulu to something else than 2*pi
+ modulo to something else than 2*pi
Returns
-------
@@ -307,7 +307,7 @@ def jackknifed_sdf_variance(yk, eigvals, sides='onesided', adaptive=True):
sides : str, optional
Compute the jackknife pseudovalues over as one-sided or
two-sided spectra
- adpative : bool, optional
+ adaptive : bool, optional
Compute the adaptive weighting for each jackknife pseudovalue
Returns
@@ -881,7 +881,7 @@ def detect_lines(s, tapers, p=None, **taper_kws):
# If we can get it, we want the cythonized version
try:
- from _utils import tridisolve
+ from nitime._utils import tridisolve
# If that doesn't work, we define it here:
except ImportError:
@@ -1538,7 +1538,7 @@ def tril_indices(n, k=0):
Examples
--------
- Commpute two different sets of indices to access 4x4 arrays, one for the
+ Compute two different sets of indices to access 4x4 arrays, one for the
lower triangular part starting at the main diagonal, and one starting two
diagonals further right:
@@ -1613,7 +1613,7 @@ def triu_indices(n, k=0):
Examples
--------
- Commpute two different sets of indices to access 4x4 arrays, one for the
+ Compute two different sets of indices to access 4x4 arrays, one for the
upper triangular part starting at the main diagonal, and one starting two
diagonals further right:
@@ -2094,7 +2094,7 @@ def fir_design_matrix(events, len_hrf):
corresponding to the bin represented by each slot in the array. In
time-bins in which no event occurred, a 0 should be entered. If negative
event values are entered, they will be used as "negative" events, as in
- events that should be contrasted with the postitive events (typically -1
+ events that should be contrasted with the positive events (typically -1
and 1 can be used for a simple contrast of two conditions)
len_hrf : int
=====================================
nitime/viz.py
=====================================
@@ -63,15 +63,15 @@ def plot_tseries(time_series, fig=None, axis=0,
subplot: an axis number (if there are several in the figure to be opened),
defaults to 0.
- xticks: optional, list, specificies what values to put xticks on. Defaults
+ xticks: optional, list, specifies what values to put xticks on. Defaults
to the matlplotlib-generated.
- yticks: optional, list, specificies what values to put xticks on. Defaults
+ yticks: optional, list, specifies what values to put xticks on. Defaults
to the matlplotlib-generated.
- xlabel: optional, list, specificies what labels to put on xticks
+ xlabel: optional, list, specifies what labels to put on xticks
- ylabel: optional, list, specificies what labels to put on yticks
+ ylabel: optional, list, specifies what labels to put on yticks
yerror: optional, UniformTimeSeries with the same sampling_rate and number
of samples and channels as time_series, the error will be displayed as a
@@ -276,7 +276,7 @@ def drawmatrix_channels(in_m, channel_names=None, fig=None, x_tick_rot=0,
# diagonal values:
idx_null = tril_indices(m.shape[0])
m[idx_null] = np.nan
- # tranpose the upper triangle to lower
+ # transpose the upper triangle to lower
m = m.T
# Extract the minimum and maximum values for scaling of the
@@ -709,7 +709,7 @@ def draw_graph(G,
# Set default edge colormap
if edge_cmap is None:
# Make an object with the colormap API, that maps all input values to
- # the default color (with proper alhpa)
+ # the default color (with proper alpha)
edge_cmap = (lambda val, alpha:
colors.colorConverter.to_rgba(default_edge_color, alpha))
=====================================
pyproject.toml
=====================================
@@ -3,9 +3,8 @@ requires = [
"setuptools",
"setuptools_scm[toml]>=6.2",
"cython",
- # As of numpy 1.25, you can now build against older APIs.
- # https://numpy.org/doc/stable/release/1.25.0-notes.html
- "numpy>=1.25; python_version > '3.8'",
+ # Wheels need to be built with NumPy 2.0 to be compatible with 2.0 and 1.x
+ "numpy>=2.0.0rc1,<3; python_version > '3.8'",
# NEP29-minimum as of Aug 17, 2023 (1.25 doesn't support 3.8)
"numpy==1.22; python_version == '3.8'",
]
@@ -56,9 +55,24 @@ include = ["nitime*"]
write_to = "nitime/_version.py"
[tool.cibuildwheel]
-# Disable PyPy
-skip = "pp*"
+# Disable PyPy, and no NumPy wheels for 3.8 Linux aarch64 or musl
+skip = "pp* cp38-*_aarch64 cp38-musllinux_*"
# 64-bit builds only; 32-bit builds seem pretty niche these days, so
# don't bother unless someone asks
-archs = ["auto64"]
+archs = ["native"]
+
+test-requires = [
+ "pytest",
+ "nitime[full]", # Enable all optional behavior
+]
+test-command = "pytest -rsx --pyargs nitime"
+
+[tool.cibuildwheel.linux]
+archs = ["x86_64", "aarch64"]
+
+[tool.codespell]
+skip = '.git,*.pdf,*.svg,go.sum,*.css'
+check-hidden = true
+ignore-regex = '\b(Ines Samengo)\b'
+ignore-words-list = 'nd,ans'
View it on GitLab: https://salsa.debian.org/med-team/nitime/-/commit/9fca4c0d76b377b7f439a2c90ec97f2f4c1743bc
--
View it on GitLab: https://salsa.debian.org/med-team/nitime/-/commit/9fca4c0d76b377b7f439a2c90ec97f2f4c1743bc
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240922/8c70ace8/attachment-0001.htm>
More information about the debian-med-commit
mailing list