Source: nitime Version: 0.9-4 Severity: serious Justification: FTBFS Tags: bookworm sid ftbfs User: lu...@debian.org Usertags: ftbfs-20230120 ftbfs-bookworm
Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > debian/rules binary > dh binary --with python3 --buildsystem pybuild > dh_update_autotools_config -O--buildsystem=pybuild > dh_autoreconf -O--buildsystem=pybuild > dh_auto_configure -O--buildsystem=pybuild > I: pybuild base:240: python3.10 setup.py config > I: pybuild base:240: python3.11 setup.py config > dh_auto_build -O--buildsystem=pybuild > I: pybuild base:240: /usr/bin/python3.10 setup.py build > I: pybuild base:240: /usr/bin/python3 setup.py build > dh_auto_test -O--buildsystem=pybuild > I: pybuild base:240: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build; > python3.10 -m pytest > ============================= test session starts > ============================== > platform linux -- Python 3.10.9, pytest-7.2.1, pluggy-1.0.0+repack > rootdir: /<<PKGBUILDDIR>> > collected 123 items > > nitime/algorithms/tests/test_autoregressive.py ..... [ > 4%] > nitime/algorithms/tests/test_coherence.py ........F.s.FFF [ > 16%] > nitime/algorithms/tests/test_correlation.py . [ > 17%] > nitime/algorithms/tests/test_entropy.py ..... [ > 21%] > nitime/algorithms/tests/test_event_related.py . [ > 21%] > nitime/algorithms/tests/test_spectral.py ................ [ > 34%] > nitime/analysis/tests/test_base.py . [ > 35%] > nitime/analysis/tests/test_coherence.py .F..F. [ > 40%] > nitime/analysis/tests/test_correlation.py F [ > 41%] > nitime/analysis/tests/test_granger.py .. [ > 43%] > nitime/analysis/tests/test_snr.py . [ > 43%] > nitime/fmri/tests/test_io.py . [ > 44%] > nitime/tests/test_algorithms.py ......F. [ > 51%] > nitime/tests/test_analysis.py ....... [ > 56%] > nitime/tests/test_descriptors.py . [ > 57%] > nitime/tests/test_lazy.py .. [ > 59%] > nitime/tests/test_timeseries.py .................................... [ > 88%] > nitime/tests/test_utils.py ........... [ > 97%] > nitime/tests/test_viz.py ... > [100%] > > =================================== FAILURES > =================================== > ____________________________ test_coherency_cached > _____________________________ > > def test_coherency_cached(): > """Tests that the cached coherency gives the same result as the > standard > coherency""" > > f1, c1 = tsa.coherency(tseries) > > ij = [(0, 1), (1, 0)] > > f2, cache = tsa.cache_fft(tseries, ij) > > nitime/algorithms/tests/test_coherence.py:185: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex'. Did you > mean: 'complex_'? > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > ____________________________ test_cached_coherence > _____________________________ > > @pytest.mark.skipif(old_mpl, reason="MPL version before 0.99") > def test_cached_coherence(): > """Testing the cached coherence functions """ > NFFT = 64 # This is the default behavior > n_freqs = NFFT // 2 + 1 > ij = [(0, 1), (1, 0)] > ts = np.loadtxt(os.path.join(test_dir_path, 'tseries12.txt')) > > freqs, cache = tsa.cache_fft(ts, ij) > > nitime/algorithms/tests/test_coherence.py:275: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex'. Did you > mean: 'complex_'? > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > _____________________________ test_cache_to_phase > ______________________________ > > def test_cache_to_phase(): > """ > Test phase calculations from cached windowed FFT > > """ > ij = [(0, 1), (1, 0)] > x = np.sin(t) + np.sin(2 * t) + np.sin(3 * t) + > np.random.rand(t.shape[-1]) > y = np.sin(t) + np.sin(2 * t) + np.sin(3 * t) + > np.random.rand(t.shape[-1]) > ts = np.vstack([x, y]) > > freqs, cache = tsa.cache_fft(ts, ij) > > nitime/algorithms/tests/test_coherence.py:341: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex'. Did you > mean: 'complex_'? > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > ___________________________ test_cache_to_coherency > ____________________________ > > def test_cache_to_coherency(): > """ > > Test cache_to_coherency against the standard coherency calculation > > """ > ij = [(0, 1), (1, 0)] > ts = np.loadtxt(os.path.join(test_dir_path, 'tseries12.txt')) > > freqs, cache = tsa.cache_fft(ts, ij) > > nitime/algorithms/tests/test_coherence.py:353: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex'. Did you > mean: 'complex_'? > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > _________________________ test_SparseCoherenceAnalyzer > _________________________ > > @pytest.mark.skipif(old_mpl, reason="Old MPL") > def test_SparseCoherenceAnalyzer(): > Fs = np.pi > t = np.arange(256) > x = np.sin(10 * t) + np.random.rand(t.shape[-1]) > y = np.sin(10 * t) + np.random.rand(t.shape[-1]) > T = ts.TimeSeries(np.vstack([x, y]), sampling_rate=Fs) > C1 = nta.SparseCoherenceAnalyzer(T, ij=((0, 1), (1, 0))) > C2 = nta.CoherenceAnalyzer(T) > > # Coherence symmetry: > > npt.assert_almost_equal(np.abs(C1.coherence[0, 1]), > np.abs(C1.coherence[1, 0])) > > nitime/analysis/tests/test_coherence.py:91: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:477: in coherence > coherence = np.abs(self.coherency ** 2) > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:470: in coherency > coherency = tsa.cache_to_coherency(self.cache, self.ij) > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:487: in cache > f, cache = tsa.cache_fft(data, > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex'. Did you > mean: 'complex_'? > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > __________________________ test_SeedCoherenceAnalyzer > __________________________ > > def test_SeedCoherenceAnalyzer(): > """ Test the SeedCoherenceAnalyzer """ > methods = (None, > {"this_method": 'welch', "NFFT": 256}, > {"this_method": 'multi_taper_csd'}, > {"this_method": 'periodogram_csd', "NFFT": 256}) > > Fs = np.pi > t = np.arange(256) > seed1 = np.sin(10 * t) + np.random.rand(t.shape[-1]) > seed2 = np.sin(10 * t) + np.random.rand(t.shape[-1]) > target = np.sin(10 * t) + np.random.rand(t.shape[-1]) > T = ts.TimeSeries(np.vstack([seed1, target]), sampling_rate=Fs) > T_seed1 = ts.TimeSeries(seed1, sampling_rate=Fs) > T_seed2 = ts.TimeSeries(np.vstack([seed1, seed2]), sampling_rate=Fs) > T_target = ts.TimeSeries(np.vstack([seed1, target]), sampling_rate=Fs) > for this_method in methods: > if this_method is None or this_method['this_method'] == 'welch': > C1 = nta.CoherenceAnalyzer(T, method=this_method) > C2 = nta.SeedCoherenceAnalyzer(T_seed1, T_target, > method=this_method) > C3 = nta.SeedCoherenceAnalyzer(T_seed2, T_target, > method=this_method) > > > npt.assert_almost_equal(C1.coherence[0, 1], C2.coherence[1]) > > nitime/analysis/tests/test_coherence.py:184: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:616: in coherence > return np.abs(self.coherency) ** 2 > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:659: in coherency > self.frequencies.shape[0]), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex'. Did you > mean: 'complex_'? > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > _________________________ test_SeedCorrelationAnalyzer > _________________________ > > def test_SeedCorrelationAnalyzer(): > > targ = ts.TimeSeries(np.random.rand(10, 10), sampling_interval=1) > > # Test single source case > seed = ts.TimeSeries(np.random.rand(10), sampling_interval=1) > corr = nta.SeedCorrelationAnalyzer(seed, targ) > our_coef_array = corr.corrcoef > np_coef_array = np.array([np.corrcoef(seed.data, a)[0, 1] for a in > targ.data]) > > npt.assert_array_almost_equal(our_coef_array, np_coef_array) > > # Test multiple sources > seed = ts.TimeSeries(np.random.rand(2, 10), sampling_interval=1) > corr = nta.SeedCorrelationAnalyzer(seed, targ) > > our_coef_array = corr.corrcoef > > nitime/analysis/tests/test_correlation.py:23: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/correlation.py:150: in corrcoef > self.target.data.shape[0]), dtype=np.float) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'float' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'float'. Did you > mean: 'cfloat'? > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > _______________________________ test_psd_matlab > ________________________________ > > def test_psd_matlab(): > > """ Test the results of mlab csd/psd against saved results from > Matlab""" > > from matplotlib import mlab > > test_dir_path = os.path.join(nitime.__path__[0], 'tests') > > ts = np.loadtxt(os.path.join(test_dir_path, 'tseries12.txt')) > > #Complex signal! > > ts0 = ts[1] + ts[0] * np.complex(0, 1) > > nitime/tests/test_algorithms.py:148: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex'. Did you > mean: 'complex_'? > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > =============================== warnings summary > =============================== > nitime/algorithms/event_related.py:13 > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/event_related.py:13: > DeprecationWarning: invalid escape sequence '\h' > """ > > nitime/algorithms/tests/test_coherence.py:206 > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_coherence.py:206: > DeprecationWarning: invalid escape sequence '\c' > """ > > .pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > .pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > .pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py:73: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig1 = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > .pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > .pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py:78: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig2 = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py::test_periodogram > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py:121: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py::test_periodogram_csd > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py:146: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig1 = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py::test_periodogram_csd > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/tests/test_spectral.py:150: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig2 = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.10/build/nitime/analysis/tests/test_coherence.py::test_CoherenceAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/analysis/coherence.py:200: > RuntimeWarning: invalid value encountered in divide > delay[i, j] = this_phase / (2 * np.pi * self.frequencies) > > .pybuild/cpython3_3.10/build/nitime/analysis/tests/test_coherence.py::test_CoherenceAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/analysis/coherence.py:200: > RuntimeWarning: divide by zero encountered in divide > delay[i, j] = this_phase / (2 * np.pi * self.frequencies) > > .pybuild/cpython3_3.10/build/nitime/analysis/tests/test_coherence.py::test_CoherenceAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/cohere.py:699: > RuntimeWarning: divide by zero encountered in divide > return (((np.abs(Rxy - Rxr * Rry)) ** 2) / > > .pybuild/cpython3_3.10/build/nitime/analysis/tests/test_coherence.py::test_CoherenceAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/cohere.py:699: > RuntimeWarning: invalid value encountered in divide > return (((np.abs(Rxy - Rxr * Rry)) ** 2) / > > .pybuild/cpython3_3.10/build/nitime/fmri/tests/test_io.py: 10 warnings > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/fmri/io.py:121: > DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which > has a more predictable return type. To obtain get_data() behavior going > forward, use numpy.asanyarray(img.dataobj). > > * deprecated from version: 3.0 > * Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of > version: 5.0 > data = im.get_data() > > .pybuild/cpython3_3.10/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > .pybuild/cpython3_3.10/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > .pybuild/cpython3_3.10/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > .pybuild/cpython3_3.10/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/fmri/io.py:91: > DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which > has a more predictable return type. To obtain get_data() behavior going > forward, use numpy.asanyarray(img.dataobj). > > * deprecated from version: 3.0 > * Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of > version: 5.0 > data = im.get_data() > > .pybuild/cpython3_3.10/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/fmri/tests/test_io.py:68: > DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which > has a more predictable return type. To obtain get_data() behavior going > forward, use numpy.asanyarray(img.dataobj). > > * deprecated from version: 3.0 > * Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of > version: 5.0 > data = io.load(fmri_file1).get_data() > > .pybuild/cpython3_3.10/build/nitime/tests/test_algorithms.py::test_scipy_resample > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/tests/test_algorithms.py:27: > DeprecationWarning: Please use `resample` from the `scipy.signal` namespace, > the `scipy.signal.signaltools` namespace is deprecated. > t_up = signaltools.resample(tst, 128) > > .pybuild/cpython3_3.10/build/nitime/tests/test_algorithms.py::test_scipy_resample > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/tests/test_algorithms.py:30: > DeprecationWarning: Please use `resample` from the `scipy.signal` namespace, > the `scipy.signal.signaltools` namespace is deprecated. > t_dn = signaltools.resample(tst, 32) > > .pybuild/cpython3_3.10/build/nitime/tests/test_algorithms.py::test_scipy_resample > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/tests/test_algorithms.py:36: > DeprecationWarning: Please use `resample` from the `scipy.signal` namespace, > the `scipy.signal.signaltools` namespace is deprecated. > t_dn2 = signaltools.resample(tst, 48) > > .pybuild/cpython3_3.10/build/nitime/tests/test_analysis.py::test_MorletWaveletAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/wavelet.py:77: > RuntimeWarning: divide by zero encountered in log > wf = (2 * np.exp(-(np.log(f) - np.log(f0)) ** 2 / (2 * sfl ** 2)) * > > .pybuild/cpython3_3.10/build/nitime/tests/test_analysis.py::test_MorletWaveletAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/algorithms/wavelet.py:77: > RuntimeWarning: invalid value encountered in log > wf = (2 * np.exp(-(np.log(f) - np.log(f0)) ** 2 / (2 * sfl ** 2)) * > > .pybuild/cpython3_3.10/build/nitime/tests/test_lazy.py::test_lazy_noreload > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/tests/test_lazy.py:40: > DeprecationWarning: the imp module is deprecated in favour of importlib and > slated for removal in Python 3.12; see the module's documentation for > alternative uses > import imp > > .pybuild/cpython3_3.10/build/nitime/tests/test_viz.py::test_drawgraph_channels > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build/nitime/viz.py:681: > DeprecationWarning: adj_matrix is deprecated and will be removed in version > 3.0. > Use `adjacency_matrix` instead > > amat = nx.adj_matrix(G).A # get a normal array out of it > > .pybuild/cpython3_3.10/build/nitime/tests/test_viz.py::test_drawgraph_channels > /usr/lib/python3/dist-packages/networkx/linalg/graphmatrix.py:187: > FutureWarning: adjacency_matrix will return a scipy.sparse array instead of a > matrix in Networkx 3.0. > return adjacency_matrix(G, nodelist, dtype, weight) > > .pybuild/cpython3_3.10/build/nitime/tests/test_viz.py::test_drawgraph_channels > /usr/lib/python3/dist-packages/networkx/linalg/graphmatrix.py:173: > DeprecationWarning: > > The scipy.sparse array containers will be used instead of matrices > in Networkx 3.0. Use `to_scipy_sparse_array` instead. > return nx.to_scipy_sparse_matrix(G, nodelist=nodelist, dtype=dtype, > weight=weight) > > -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html > =========================== short test summary info > ============================ > FAILED nitime/algorithms/tests/test_coherence.py::test_coherency_cached - > Att... > FAILED nitime/algorithms/tests/test_coherence.py::test_cached_coherence - > Att... > FAILED nitime/algorithms/tests/test_coherence.py::test_cache_to_phase - > Attri... > FAILED nitime/algorithms/tests/test_coherence.py::test_cache_to_coherency - > A... > FAILED nitime/analysis/tests/test_coherence.py::test_SparseCoherenceAnalyzer > FAILED nitime/analysis/tests/test_coherence.py::test_SeedCoherenceAnalyzer - > ... > FAILED nitime/analysis/tests/test_correlation.py::test_SeedCorrelationAnalyzer > FAILED nitime/tests/test_algorithms.py::test_psd_matlab - AttributeError: > mod... > ============ 8 failed, 114 passed, 1 skipped, 39 warnings in 32.57s > ============ > E: pybuild pybuild:388: test: plugin distutils failed with: exit code=1: cd > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10/build; python3.10 -m pytest > I: pybuild base:240: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build; > python3.11 -m pytest > ============================= test session starts > ============================== > platform linux -- Python 3.11.1, pytest-7.2.1, pluggy-1.0.0+repack > rootdir: /<<PKGBUILDDIR>> > collected 123 items > > nitime/algorithms/tests/test_autoregressive.py ..... [ > 4%] > nitime/algorithms/tests/test_coherence.py ........F.s.FFF [ > 16%] > nitime/algorithms/tests/test_correlation.py . [ > 17%] > nitime/algorithms/tests/test_entropy.py ..... [ > 21%] > nitime/algorithms/tests/test_event_related.py . [ > 21%] > nitime/algorithms/tests/test_spectral.py ................ [ > 34%] > nitime/analysis/tests/test_base.py . [ > 35%] > nitime/analysis/tests/test_coherence.py .F..F. [ > 40%] > nitime/analysis/tests/test_correlation.py F [ > 41%] > nitime/analysis/tests/test_granger.py .. [ > 43%] > nitime/analysis/tests/test_snr.py . [ > 43%] > nitime/fmri/tests/test_io.py . [ > 44%] > nitime/tests/test_algorithms.py ......F. [ > 51%] > nitime/tests/test_analysis.py ....... [ > 56%] > nitime/tests/test_descriptors.py . [ > 57%] > nitime/tests/test_lazy.py .. [ > 59%] > nitime/tests/test_timeseries.py .................................... [ > 88%] > nitime/tests/test_utils.py ........... [ > 97%] > nitime/tests/test_viz.py ... > [100%] > > =================================== FAILURES > =================================== > ____________________________ test_coherency_cached > _____________________________ > > def test_coherency_cached(): > """Tests that the cached coherency gives the same result as the > standard > coherency""" > > f1, c1 = tsa.coherency(tseries) > > ij = [(0, 1), (1, 0)] > > f2, cache = tsa.cache_fft(tseries, ij) > > nitime/algorithms/tests/test_coherence.py:185: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex' > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > ____________________________ test_cached_coherence > _____________________________ > > @pytest.mark.skipif(old_mpl, reason="MPL version before 0.99") > def test_cached_coherence(): > """Testing the cached coherence functions """ > NFFT = 64 # This is the default behavior > n_freqs = NFFT // 2 + 1 > ij = [(0, 1), (1, 0)] > ts = np.loadtxt(os.path.join(test_dir_path, 'tseries12.txt')) > > freqs, cache = tsa.cache_fft(ts, ij) > > nitime/algorithms/tests/test_coherence.py:275: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex' > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > _____________________________ test_cache_to_phase > ______________________________ > > def test_cache_to_phase(): > """ > Test phase calculations from cached windowed FFT > > """ > ij = [(0, 1), (1, 0)] > x = np.sin(t) + np.sin(2 * t) + np.sin(3 * t) + > np.random.rand(t.shape[-1]) > y = np.sin(t) + np.sin(2 * t) + np.sin(3 * t) + > np.random.rand(t.shape[-1]) > ts = np.vstack([x, y]) > > freqs, cache = tsa.cache_fft(ts, ij) > > nitime/algorithms/tests/test_coherence.py:341: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex' > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > ___________________________ test_cache_to_coherency > ____________________________ > > def test_cache_to_coherency(): > """ > > Test cache_to_coherency against the standard coherency calculation > > """ > ij = [(0, 1), (1, 0)] > ts = np.loadtxt(os.path.join(test_dir_path, 'tseries12.txt')) > > freqs, cache = tsa.cache_fft(ts, ij) > > nitime/algorithms/tests/test_coherence.py:353: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex' > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > _________________________ test_SparseCoherenceAnalyzer > _________________________ > > @pytest.mark.skipif(old_mpl, reason="Old MPL") > def test_SparseCoherenceAnalyzer(): > Fs = np.pi > t = np.arange(256) > x = np.sin(10 * t) + np.random.rand(t.shape[-1]) > y = np.sin(10 * t) + np.random.rand(t.shape[-1]) > T = ts.TimeSeries(np.vstack([x, y]), sampling_rate=Fs) > C1 = nta.SparseCoherenceAnalyzer(T, ij=((0, 1), (1, 0))) > C2 = nta.CoherenceAnalyzer(T) > > # Coherence symmetry: > > npt.assert_almost_equal(np.abs(C1.coherence[0, 1]), > np.abs(C1.coherence[1, 0])) > > nitime/analysis/tests/test_coherence.py:91: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:477: in coherence > coherence = np.abs(self.coherency ** 2) > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:470: in coherency > coherency = tsa.cache_to_coherency(self.cache, self.ij) > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:487: in cache > f, cache = tsa.cache_fft(data, > nitime/algorithms/cohere.py:1008: in cache_fft > Slices = np.zeros((n_slices, n_freqs), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex' > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > __________________________ test_SeedCoherenceAnalyzer > __________________________ > > def test_SeedCoherenceAnalyzer(): > """ Test the SeedCoherenceAnalyzer """ > methods = (None, > {"this_method": 'welch', "NFFT": 256}, > {"this_method": 'multi_taper_csd'}, > {"this_method": 'periodogram_csd', "NFFT": 256}) > > Fs = np.pi > t = np.arange(256) > seed1 = np.sin(10 * t) + np.random.rand(t.shape[-1]) > seed2 = np.sin(10 * t) + np.random.rand(t.shape[-1]) > target = np.sin(10 * t) + np.random.rand(t.shape[-1]) > T = ts.TimeSeries(np.vstack([seed1, target]), sampling_rate=Fs) > T_seed1 = ts.TimeSeries(seed1, sampling_rate=Fs) > T_seed2 = ts.TimeSeries(np.vstack([seed1, seed2]), sampling_rate=Fs) > T_target = ts.TimeSeries(np.vstack([seed1, target]), sampling_rate=Fs) > for this_method in methods: > if this_method is None or this_method['this_method'] == 'welch': > C1 = nta.CoherenceAnalyzer(T, method=this_method) > C2 = nta.SeedCoherenceAnalyzer(T_seed1, T_target, > method=this_method) > C3 = nta.SeedCoherenceAnalyzer(T_seed2, T_target, > method=this_method) > > > npt.assert_almost_equal(C1.coherence[0, 1], C2.coherence[1]) > > nitime/analysis/tests/test_coherence.py:184: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:616: in coherence > return np.abs(self.coherency) ** 2 > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/coherence.py:659: in coherency > self.frequencies.shape[0]), dtype=np.complex) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex' > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > _________________________ test_SeedCorrelationAnalyzer > _________________________ > > def test_SeedCorrelationAnalyzer(): > > targ = ts.TimeSeries(np.random.rand(10, 10), sampling_interval=1) > > # Test single source case > seed = ts.TimeSeries(np.random.rand(10), sampling_interval=1) > corr = nta.SeedCorrelationAnalyzer(seed, targ) > our_coef_array = corr.corrcoef > np_coef_array = np.array([np.corrcoef(seed.data, a)[0, 1] for a in > targ.data]) > > npt.assert_array_almost_equal(our_coef_array, np_coef_array) > > # Test multiple sources > seed = ts.TimeSeries(np.random.rand(2, 10), sampling_interval=1) > corr = nta.SeedCorrelationAnalyzer(seed, targ) > > our_coef_array = corr.corrcoef > > nitime/analysis/tests/test_correlation.py:23: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > nitime/descriptors.py:140: in __get__ > val = self.getter(obj) > nitime/analysis/correlation.py:150: in corrcoef > self.target.data.shape[0]), dtype=np.float) > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'float' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'float' > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > _______________________________ test_psd_matlab > ________________________________ > > def test_psd_matlab(): > > """ Test the results of mlab csd/psd against saved results from > Matlab""" > > from matplotlib import mlab > > test_dir_path = os.path.join(nitime.__path__[0], 'tests') > > ts = np.loadtxt(os.path.join(test_dir_path, 'tseries12.txt')) > > #Complex signal! > > ts0 = ts[1] + ts[0] * np.complex(0, 1) > > nitime/tests/test_algorithms.py:148: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ > > attr = 'complex' > > def __getattr__(attr): > # Warn for expired attributes, and return a dummy function > # that always raises an exception. > import warnings > try: > msg = __expired_functions__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > > def _expired(*args, **kwds): > raise RuntimeError(msg) > > return _expired > > # Emit warnings for deprecated attributes > try: > val, msg = __deprecated_attrs__[attr] > except KeyError: > pass > else: > warnings.warn(msg, DeprecationWarning, stacklevel=2) > return val > > if attr in __future_scalars__: > # And future warnings for those that will change, but also give > # the AttributeError > warnings.warn( > f"In the future `np.{attr}` will be defined as the " > "corresponding NumPy scalar. (This may have returned Python " > "scalars in past versions.", FutureWarning, stacklevel=2) > > # Importing Tester requires importing all of UnitTest which is not a > # cheap import Since it is mainly used in test suits, we lazy import > it > # here to save on the order of 10 ms of import time for most users > # > # The previous way Tester was imported also had a side effect of > adding > # the full `numpy.testing` namespace > if attr == 'testing': > import numpy.testing as testing > return testing > elif attr == 'Tester': > from .testing import Tester > return Tester > > > raise AttributeError("module {!r} has no attribute " > "{!r}".format(__name__, attr)) > E AttributeError: module 'numpy' has no attribute 'complex' > > /usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError > =============================== warnings summary > =============================== > nitime/algorithms/event_related.py:13 > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/event_related.py:13: > DeprecationWarning: invalid escape sequence '\h' > """ > > nitime/algorithms/tests/test_coherence.py:206 > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_coherence.py:206: > DeprecationWarning: invalid escape sequence '\c' > """ > > .pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > .pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > .pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py:73: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig1 = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > .pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > .pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py::test_get_spectra_complex > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py:78: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig2 = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py::test_periodogram > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py:121: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py::test_periodogram_csd > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py:146: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig1 = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py::test_periodogram_csd > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/tests/test_spectral.py:150: > DeprecationWarning: scipy.sqrt is deprecated and will be removed in SciPy > 2.0.0, use numpy.lib.scimath.sqrt instead > arsig2 = r + c * scipy.sqrt(-1) > > .pybuild/cpython3_3.11/build/nitime/analysis/tests/test_coherence.py::test_CoherenceAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/analysis/coherence.py:200: > RuntimeWarning: invalid value encountered in divide > delay[i, j] = this_phase / (2 * np.pi * self.frequencies) > > .pybuild/cpython3_3.11/build/nitime/analysis/tests/test_coherence.py::test_CoherenceAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/analysis/coherence.py:200: > RuntimeWarning: divide by zero encountered in divide > delay[i, j] = this_phase / (2 * np.pi * self.frequencies) > > .pybuild/cpython3_3.11/build/nitime/analysis/tests/test_coherence.py::test_CoherenceAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/cohere.py:699: > RuntimeWarning: divide by zero encountered in divide > return (((np.abs(Rxy - Rxr * Rry)) ** 2) / > > .pybuild/cpython3_3.11/build/nitime/analysis/tests/test_coherence.py::test_CoherenceAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/cohere.py:699: > RuntimeWarning: invalid value encountered in divide > return (((np.abs(Rxy - Rxr * Rry)) ** 2) / > > .pybuild/cpython3_3.11/build/nitime/fmri/tests/test_io.py: 10 warnings > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/fmri/io.py:121: > DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which > has a more predictable return type. To obtain get_data() behavior going > forward, use numpy.asanyarray(img.dataobj). > > * deprecated from version: 3.0 > * Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of > version: 5.0 > data = im.get_data() > > .pybuild/cpython3_3.11/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > .pybuild/cpython3_3.11/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > .pybuild/cpython3_3.11/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > .pybuild/cpython3_3.11/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/fmri/io.py:91: > DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which > has a more predictable return type. To obtain get_data() behavior going > forward, use numpy.asanyarray(img.dataobj). > > * deprecated from version: 3.0 > * Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of > version: 5.0 > data = im.get_data() > > .pybuild/cpython3_3.11/build/nitime/fmri/tests/test_io.py::test_time_series_from_file > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/fmri/tests/test_io.py:68: > DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which > has a more predictable return type. To obtain get_data() behavior going > forward, use numpy.asanyarray(img.dataobj). > > * deprecated from version: 3.0 > * Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of > version: 5.0 > data = io.load(fmri_file1).get_data() > > .pybuild/cpython3_3.11/build/nitime/tests/test_algorithms.py::test_scipy_resample > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/tests/test_algorithms.py:27: > DeprecationWarning: Please use `resample` from the `scipy.signal` namespace, > the `scipy.signal.signaltools` namespace is deprecated. > t_up = signaltools.resample(tst, 128) > > .pybuild/cpython3_3.11/build/nitime/tests/test_algorithms.py::test_scipy_resample > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/tests/test_algorithms.py:30: > DeprecationWarning: Please use `resample` from the `scipy.signal` namespace, > the `scipy.signal.signaltools` namespace is deprecated. > t_dn = signaltools.resample(tst, 32) > > .pybuild/cpython3_3.11/build/nitime/tests/test_algorithms.py::test_scipy_resample > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/tests/test_algorithms.py:36: > DeprecationWarning: Please use `resample` from the `scipy.signal` namespace, > the `scipy.signal.signaltools` namespace is deprecated. > t_dn2 = signaltools.resample(tst, 48) > > .pybuild/cpython3_3.11/build/nitime/tests/test_analysis.py::test_MorletWaveletAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/wavelet.py:77: > RuntimeWarning: divide by zero encountered in log > wf = (2 * np.exp(-(np.log(f) - np.log(f0)) ** 2 / (2 * sfl ** 2)) * > > .pybuild/cpython3_3.11/build/nitime/tests/test_analysis.py::test_MorletWaveletAnalyzer > > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/algorithms/wavelet.py:77: > RuntimeWarning: invalid value encountered in log > wf = (2 * np.exp(-(np.log(f) - np.log(f0)) ** 2 / (2 * sfl ** 2)) * > > .pybuild/cpython3_3.11/build/nitime/tests/test_lazy.py::test_lazy_noreload > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/tests/test_lazy.py:40: > DeprecationWarning: the imp module is deprecated in favour of importlib and > slated for removal in Python 3.12; see the module's documentation for > alternative uses > import imp > > .pybuild/cpython3_3.11/build/nitime/tests/test_viz.py::test_drawgraph_channels > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/nitime/viz.py:681: > DeprecationWarning: adj_matrix is deprecated and will be removed in version > 3.0. > Use `adjacency_matrix` instead > > amat = nx.adj_matrix(G).A # get a normal array out of it > > .pybuild/cpython3_3.11/build/nitime/tests/test_viz.py::test_drawgraph_channels > /usr/lib/python3/dist-packages/networkx/linalg/graphmatrix.py:187: > FutureWarning: adjacency_matrix will return a scipy.sparse array instead of a > matrix in Networkx 3.0. > return adjacency_matrix(G, nodelist, dtype, weight) > > .pybuild/cpython3_3.11/build/nitime/tests/test_viz.py::test_drawgraph_channels > /usr/lib/python3/dist-packages/networkx/linalg/graphmatrix.py:173: > DeprecationWarning: > > The scipy.sparse array containers will be used instead of matrices > in Networkx 3.0. Use `to_scipy_sparse_array` instead. > return nx.to_scipy_sparse_matrix(G, nodelist=nodelist, dtype=dtype, > weight=weight) > > -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html > =========================== short test summary info > ============================ > FAILED nitime/algorithms/tests/test_coherence.py::test_coherency_cached - > Att... > FAILED nitime/algorithms/tests/test_coherence.py::test_cached_coherence - > Att... > FAILED nitime/algorithms/tests/test_coherence.py::test_cache_to_phase - > Attri... > FAILED nitime/algorithms/tests/test_coherence.py::test_cache_to_coherency - > A... > FAILED nitime/analysis/tests/test_coherence.py::test_SparseCoherenceAnalyzer > FAILED nitime/analysis/tests/test_coherence.py::test_SeedCoherenceAnalyzer - > ... > FAILED nitime/analysis/tests/test_correlation.py::test_SeedCorrelationAnalyzer > FAILED nitime/tests/test_algorithms.py::test_psd_matlab - AttributeError: > mod... > ============ 8 failed, 114 passed, 1 skipped, 39 warnings in 30.81s > ============ > E: pybuild pybuild:388: test: plugin distutils failed with: exit code=1: cd > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build; python3.11 -m pytest > dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.10 > 3.11" returned exit code 13 The full build log is available from: http://qa-logs.debian.net/2023/01/20/nitime_0.9-4_unstable.log All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20230120;users=lu...@debian.org or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20230120&fusertaguser=lu...@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! If you reassign this bug to another package, please mark it as 'affects'-ing this package. See https://www.debian.org/Bugs/server-control#affects If you fail to reproduce this, please provide a build log and diff it with mine so that we can identify if something relevant changed in the meantime.