Ok thanks for reporting. I'll try to put some effort into updating to a newer version of dask soon.
On Thu, 2022-06-16 at 16:10 +0200, Drew Parsons wrote: > Source: dask > Version: 2022.01.0+dfsg-2 > Severity: normal > Control: tags -1 patch > > dask 2022.01 uses a deprecated scipy API and now fails tests with > scipy 1.8.1: > > _____________________________ test_one[chisquare] > ______________________________ > > kind = 'chisquare' > > @pytest.mark.parametrize( > "kind", ["chisquare", "power_divergence", "normaltest", > "skewtest", "kurtosistest"] > ) > def test_one(kind): > a = np.random.random(size=30) > a_ = da.from_array(a, 3) > > dask_test = getattr(dask.array.stats, kind) > scipy_test = getattr(scipy.stats, kind) > > > result = dask_test(a_) > > /usr/lib/python3/dist-packages/dask/array/tests/test_stats.py:56: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ > /usr/lib/python3/dist-packages/dask/array/stats.py:136: in chisquare > return power_divergence(f_obs, f_exp=f_exp, ddof=ddof, axis=axis, > lambda_="pearson") > /usr/lib/python3/dist-packages/dask/array/stats.py:144: in > power_divergence > if lambda_ not in scipy.stats.stats._power_div_lambda_names: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ > > name = '_power_div_lambda_names' > > def __getattr__(name): > if name not in __all__: > > raise AttributeError( > "scipy.stats.stats is deprecated and has no attribute > " > f"{name}. Try looking in scipy.stats instead.") > E AttributeError: scipy.stats.stats is deprecated and has > no attribute _power_div_lambda_names. Try looking in scipy.stats > instead. > > /usr/lib/python3/dist-packages/scipy/stats/stats.py:54: > AttributeError > > > Likewise > test_two[chisquare-kwargs4] > test_two[power_divergence-kwargs8] > test_power_divergence_invalid > > > The incompatibility is fixed in dask 2022.03 (lastest is 2022.6), > or apply the patch in PR#8694 > https://github.com/dask/dask/pull/8694 > > > > > > -- System Information: > Debian Release: bookworm/sid > APT prefers unstable > APT policy: (500, 'unstable'), (1, 'experimental') > Architecture: amd64 (x86_64) > Foreign Architectures: i386 > > Kernel: Linux 5.18.0-1-amd64 (SMP w/8 CPU threads; PREEMPT) > Kernel taint flags: TAINT_WARN > Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), > LANGUAGE=en_AU:en > Shell: /bin/sh linked to /bin/dash > Init: systemd (via /run/systemd/system) > LSM: AppArmor: enabled >