Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ee272618a8 | ||
|
f824e735d7 | ||
|
58539acd90 | ||
|
6bbf5c100b | ||
|
ad63c1ac47 | ||
|
633c962bef | ||
|
bd4e64917c | ||
|
cb4c1a5648 | ||
|
fe57db6f7b | ||
|
a59f9627e2 | ||
|
b637c5c738 | ||
|
568f7abb7e | ||
|
b4deb96dca | ||
|
cc3283a748 | ||
|
3ad0fb3b96 | ||
|
b7171384cb | ||
|
ae9e1e7328 | ||
|
7151af7d31 | ||
|
bf12251ecc | ||
|
26e3a4a412 | ||
|
0a4506f8b7 | ||
|
ddfc0d2225 | ||
|
fad1b115d2 | ||
|
586cf8ee5c | ||
|
0ab886147a |
7
.gitignore
vendored
7
.gitignore
vendored
@ -32,3 +32,10 @@ scipy-0.7.2.tar.gz
|
|||||||
/scipy-1.5.2.tar.gz
|
/scipy-1.5.2.tar.gz
|
||||||
/scipy-1.5.3.tar.gz
|
/scipy-1.5.3.tar.gz
|
||||||
/scipy-1.5.4.tar.gz
|
/scipy-1.5.4.tar.gz
|
||||||
|
/scipy-1.6.0.tar.gz
|
||||||
|
/scipy-1.6.1.tar.gz
|
||||||
|
/scipy-1.6.2.tar.gz
|
||||||
|
/scipy-1.7.0.tar.gz
|
||||||
|
/scipy-1.7.3.tar.gz
|
||||||
|
/scipy-1.8.0.tar.gz
|
||||||
|
/scipy-1.8.1.tar.gz
|
||||||
|
69
scipy-1.8.1-syevr-operator-order-explicit.patch
Normal file
69
scipy-1.8.1-syevr-operator-order-explicit.patch
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
--- scipy-1.8.1/scipy/linalg/flapack_sym_herm.pyf.src.debug 2022-04-30 06:14:37.965527300 +0900
|
||||||
|
+++ scipy-1.8.1/scipy/linalg/flapack_sym_herm.pyf.src 2022-07-01 22:51:14.057047006 +0900
|
||||||
|
@@ -772,10 +772,10 @@
|
||||||
|
integer intent(hide),dimension(liwork),depend(liwork) :: iwork
|
||||||
|
|
||||||
|
<ftype2> intent(out),dimension(n),depend(n) :: w
|
||||||
|
- <ftype2> intent(out),dimension((compute_v?MAX(0,n):0),(compute_v?(*range=='I'?iu-il+1:MAX(1,n)):0)),depend(n,compute_v,range,iu,il) :: z
|
||||||
|
+ <ftype2> intent(out),dimension((compute_v?MAX(0,n):0),(compute_v?((*range=='I')?(iu-il+1):MAX(1,n)):0)),depend(n,compute_v,range,iu,il) :: z
|
||||||
|
integer intent(out) :: m
|
||||||
|
! Only returned if range=='A' or range=='I' and il, iu = 1, n
|
||||||
|
- integer intent(out),dimension((compute_v?(2*(*range=='A'||(*range=='I' && iu-il+1==n)?n:0)):0)),depend(n,iu,il,compute_v,range) :: isuppz
|
||||||
|
+ integer intent(out),dimension((compute_v?(2*((*range=='A')||((*range=='I') && (iu-il+1==n))?n:0)):0)),depend(n,iu,il,compute_v,range) :: isuppz
|
||||||
|
integer intent(out) :: info
|
||||||
|
|
||||||
|
end subroutine <prefix2>syevr
|
||||||
|
@@ -844,7 +844,7 @@
|
||||||
|
integer intent(hide),dimension(liwork),depend(liwork) :: iwork
|
||||||
|
|
||||||
|
<ftype2> intent(out),dimension(n),depend(n) :: w
|
||||||
|
- <ftype2c> intent(out),dimension((compute_v?MAX(0,n):0),(compute_v?(*range=='I'?iu-il+1:MAX(1,n)):0)),depend(n,compute_v,range,iu,il) :: z
|
||||||
|
+ <ftype2c> intent(out),dimension((compute_v?MAX(0,n):0),(compute_v?((*range=='I')?(iu-il+1):MAX(1,n)):0)),depend(n,compute_v,range,iu,il) :: z
|
||||||
|
integer intent(out) :: m
|
||||||
|
! MKL implementation has a bug that still accesses isuppz array even if
|
||||||
|
! range=='A' or range=='I' and il, iu = 1, n which is not the case for
|
||||||
|
@@ -852,7 +852,7 @@
|
||||||
|
! of the settings. It is wasteful but necessary. The bug is fixed in
|
||||||
|
! mkl 2020 update 2 and when time comes change this line with
|
||||||
|
!
|
||||||
|
- ! integer intent(out),dimension((compute_v?(2*(*range=='A'||(*range=='I' && iu-il+1==n)?n:0)):0)),depend(n,iu,il,range,compute_v) :: isuppz
|
||||||
|
+ ! integer intent(out),dimension((compute_v?(2*(*range=='A'||((*range=='I') && (iu-il+1==n))?n:0)):0)),depend(n,iu,il,range,compute_v) :: isuppz
|
||||||
|
!
|
||||||
|
integer intent(out),dimension(2*max(1,n)),depend(n) :: isuppz
|
||||||
|
integer intent(out) :: info
|
||||||
|
@@ -919,7 +919,7 @@
|
||||||
|
integer intent(hide),dimension(5*n),depend(n) :: iwork
|
||||||
|
|
||||||
|
<ftype2> intent(out),dimension(n),depend(n) :: w
|
||||||
|
- <ftype2> intent(out),dimension((compute_v?MAX(0,n):0),(compute_v?(*range=='I'?iu-il+1:MAX(1,n)):0)),depend(n,compute_v,range,iu,il) :: z
|
||||||
|
+ <ftype2> intent(out),dimension((compute_v?MAX(0,n):0),(compute_v?((*range=='I')?(iu-il+1):MAX(1,n)):0)),depend(n,compute_v,range,iu,il) :: z
|
||||||
|
integer intent(out) :: m
|
||||||
|
integer intent(out),dimension((compute_v?n:0)),depend(compute_v,n):: ifail
|
||||||
|
integer intent(out) :: info
|
||||||
|
@@ -984,7 +984,7 @@
|
||||||
|
<ftype2> intent(hide),dimension(7*n),depend(n) :: rwork
|
||||||
|
|
||||||
|
<ftype2> intent(out),dimension(n),depend(n) :: w
|
||||||
|
- <ftype2c> intent(out),dimension((compute_v*n),(compute_v?(*range=='I'?iu-il+1:MAX(1,n)):0)),depend(compute_v,range,n,iu,il) :: z
|
||||||
|
+ <ftype2c> intent(out),dimension((compute_v*n),(compute_v?((*range=='I')?(iu-il+1):MAX(1,n)):0)),depend(compute_v,range,n,iu,il) :: z
|
||||||
|
integer intent(out) :: m
|
||||||
|
integer intent(out),dimension(compute_v*n),depend(compute_v,n):: ifail
|
||||||
|
integer intent(out) :: info
|
||||||
|
@@ -1222,7 +1222,7 @@
|
||||||
|
integer intent(hide),dimension(5*n),depend(n) :: iwork
|
||||||
|
|
||||||
|
<ftype2> intent(out),dimension(n),depend(n) :: w
|
||||||
|
- <ftype2> intent(out),dimension((jobz[0]=='V'?MAX(0,n):0),(jobz[0]=='V'?(range[0]=='I'?iu-il+1:MAX(1,n)):0)),depend(n,jobz,range,iu,il) :: z
|
||||||
|
+ <ftype2> intent(out),dimension((jobz[0]=='V'?MAX(0,n):0),(jobz[0]=='V'?((range[0]=='I')?(iu-il+1):MAX(1,n)):0)),depend(n,jobz,range,iu,il) :: z
|
||||||
|
integer intent(out) :: m
|
||||||
|
integer intent(out),dimension((jobz[0]=='N'?0:n)),depend(jobz,n):: ifail
|
||||||
|
integer intent(out) :: info
|
||||||
|
@@ -1293,7 +1293,7 @@
|
||||||
|
<ftype2> intent(hide),dimension(7*n),depend(n) :: rwork
|
||||||
|
|
||||||
|
<ftype2> intent(out),dimension(n),depend(n) :: w
|
||||||
|
- <ftype2c> intent(out),dimension((jobz[0]=='V'?MAX(0,n):0),(jobz[0]=='V'?(range[0]=='I'?iu-il+1:MAX(1,n)):0)),depend(n,jobz,range,iu,il) :: z
|
||||||
|
+ <ftype2c> intent(out),dimension((jobz[0]=='V'?MAX(0,n):0),(jobz[0]=='V'?((range[0]=='I')?(iu-il+1):MAX(1,n)):0)),depend(n,jobz,range,iu,il) :: z
|
||||||
|
integer intent(out) :: m
|
||||||
|
integer intent(out),dimension((jobz[0]=='N'?0:n)),depend(jobz,n):: ifail
|
||||||
|
integer intent(out) :: info
|
154
scipy.spec
154
scipy.spec
@ -1,6 +1,16 @@
|
|||||||
# without means enabled
|
# without means enabled
|
||||||
%bcond_with doc
|
%bcond_with doc
|
||||||
|
|
||||||
|
# Pythran is an optional build dependency.
|
||||||
|
# When used, it makes some modules faster,
|
||||||
|
# but it is usually not available soon enough for new major Python versions.
|
||||||
|
%ifarch i686 || armv7hl
|
||||||
|
# It seems pythran is broken on 32-bit arches, disable it
|
||||||
|
%bcond_with pythran
|
||||||
|
%else
|
||||||
|
%bcond_without pythran
|
||||||
|
%endif
|
||||||
|
|
||||||
# Set to pre-release version suffix if building pre-release, else %%{nil}
|
# Set to pre-release version suffix if building pre-release, else %%{nil}
|
||||||
%global rcver %{nil}
|
%global rcver %{nil}
|
||||||
|
|
||||||
@ -14,8 +24,8 @@
|
|||||||
|
|
||||||
Summary: Scientific Tools for Python
|
Summary: Scientific Tools for Python
|
||||||
Name: scipy
|
Name: scipy
|
||||||
Version: 1.5.4
|
Version: 1.8.1
|
||||||
Release: 2%{?dist}
|
Release: 6%{?dist}
|
||||||
|
|
||||||
# BSD -- whole package except:
|
# BSD -- whole package except:
|
||||||
# Boost -- scipy/special/cephes/scipy_iv.c
|
# Boost -- scipy/special/cephes/scipy_iv.c
|
||||||
@ -23,11 +33,10 @@ Release: 2%{?dist}
|
|||||||
License: BSD and Boost and Public Domain
|
License: BSD and Boost and Public Domain
|
||||||
Url: http://www.scipy.org/scipylib/index.html
|
Url: http://www.scipy.org/scipylib/index.html
|
||||||
Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz
|
Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2099102
|
||||||
# https://github.com/scipy/scipy/pull/12899
|
# https://github.com/scipy/scipy/issues/16527
|
||||||
Patch0: skip-certain-tests-on-32-bit-arches.patch
|
# https://github.com/scipy/scipy/pull/16528
|
||||||
# https://github.com/scipy/scipy/pull/13130
|
Patch0: scipy-1.8.1-syevr-operator-order-explicit.patch
|
||||||
Patch1: skip-factorial-float-tests-on-py310.patch
|
|
||||||
|
|
||||||
BuildRequires: fftw-devel, suitesparse-devel
|
BuildRequires: fftw-devel, suitesparse-devel
|
||||||
BuildRequires: %{blaslib}-devel
|
BuildRequires: %{blaslib}-devel
|
||||||
@ -44,6 +53,10 @@ BuildRequires: python3-pytest
|
|||||||
BuildRequires: python3-pytest-xdist
|
BuildRequires: python3-pytest-xdist
|
||||||
BuildRequires: python3-pytest-timeout
|
BuildRequires: python3-pytest-timeout
|
||||||
|
|
||||||
|
%if %{with pythran}
|
||||||
|
BuildRequires: pythran
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-matplotlib
|
BuildRequires: python3-matplotlib
|
||||||
@ -106,6 +119,8 @@ rm doc/sphinxext -r
|
|||||||
rm $(grep -rl '/\* Generated by Cython') PKG-INFO
|
rm $(grep -rl '/\* Generated by Cython') PKG-INFO
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
export SCIPY_USE_PYTHRAN=0%{?with_pythran}
|
||||||
|
|
||||||
for PY in %{python3_version}; do
|
for PY in %{python3_version}; do
|
||||||
# Adding -fallow-argument-mismatch workaround for https://github.com/scipy/scipy/issues/11611
|
# Adding -fallow-argument-mismatch workaround for https://github.com/scipy/scipy/issues/11611
|
||||||
env CFLAGS="$RPM_OPT_FLAGS -lm" \
|
env CFLAGS="$RPM_OPT_FLAGS -lm" \
|
||||||
@ -114,8 +129,12 @@ for PY in %{python3_version}; do
|
|||||||
%else
|
%else
|
||||||
FFLAGS="$RPM_OPT_FLAGS -fPIC" \
|
FFLAGS="$RPM_OPT_FLAGS -fPIC" \
|
||||||
%endif
|
%endif
|
||||||
OPENBLAS=%{_libdir} \
|
%ifarch x86_64
|
||||||
FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} \
|
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2068530
|
||||||
|
LDFLAGS="%{__global_ldflags} -Wl,--no-as-needed -lmvec -Wl,--as-needed" \
|
||||||
|
%else
|
||||||
|
LDFLAGS="%{__global_ldflags}" \
|
||||||
|
%endif
|
||||||
%{_bindir}/python$PY setup.py config_fc \
|
%{_bindir}/python$PY setup.py config_fc \
|
||||||
--fcompiler=gnu95 --noarch \
|
--fcompiler=gnu95 --noarch \
|
||||||
build
|
build
|
||||||
@ -131,6 +150,8 @@ for PY in %{python3_version}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
export SCIPY_USE_PYTHRAN=0%{?with_pythran}
|
||||||
|
|
||||||
%py3_install
|
%py3_install
|
||||||
# Some files got ambiguous python shebangs, we fix them after everything else is done
|
# Some files got ambiguous python shebangs, we fix them after everything else is done
|
||||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch}
|
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch}
|
||||||
@ -139,24 +160,42 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitearch
|
|||||||
# check against the reference BLAS/LAPACK
|
# check against the reference BLAS/LAPACK
|
||||||
export FLEXIBLAS=netlib
|
export FLEXIBLAS=netlib
|
||||||
|
|
||||||
|
# default test timeout
|
||||||
|
TIMEOUT=500
|
||||||
|
|
||||||
|
# skip failing TestSchur, it needs to be fixed to account for different
|
||||||
|
# (but still valid) results from lapack >= 3.10
|
||||||
|
# see: https://github.com/Reference-LAPACK/lapack/issues/628
|
||||||
|
export PYTEST_ADDOPTS="-k 'not TestSchur'"
|
||||||
|
|
||||||
%ifarch s390x
|
%ifarch s390x
|
||||||
# skip failing tests on s390x for now
|
# skip failing tests on s390x for now
|
||||||
export PYTEST_ADDOPTS="-k '\
|
export PYTEST_ADDOPTS="-k 'not TestSchur and \
|
||||||
not (TestNoData and test_nodata) and \
|
not (TestNoData and test_nodata) and \
|
||||||
not test_fortranfile_read_mixed_record and \
|
not test_solve_discrete_are'"
|
||||||
not test_kde_1d and \
|
|
||||||
not test_kde_1d_weighted and \
|
# some tests (namely test_logpdf_overflow) tend to run for a long time on s390x
|
||||||
not test_kde_2d and \
|
TIMEOUT=1000
|
||||||
not test_kde_2d_weighted and \
|
%endif
|
||||||
not test_gaussian_kde_subclassing and \
|
|
||||||
not test_gaussian_kde_covariance_caching and \
|
%ifarch aarch64 || ppc64le
|
||||||
not test_kde_integer_input and \
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1959353
|
||||||
not test_pdf_logpdf and \
|
export PYTEST_ADDOPTS="-k 'not TestSchur and not test_solve_discrete_are'"
|
||||||
not test_pdf_logpdf_weighted'"
|
TIMEOUT=1000
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch x86_64
|
||||||
|
# skip also failing test_sygst for now
|
||||||
|
export PYTEST_ADDOPTS="-k 'not TestSchur and not test_sygst'"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch i686 || armv7hl
|
||||||
|
# skip also test_cython_api: https://bugzilla.redhat.com/show_bug.cgi?id=2068496
|
||||||
|
export PYTEST_ADDOPTS="-k 'not TestSchur and not test_sygst and not test_cython_api'"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
pushd %{buildroot}/%{python3_sitearch}
|
pushd %{buildroot}/%{python3_sitearch}
|
||||||
%{pytest} --timeout=500 scipy --numprocesses=auto
|
%{pytest} --timeout=${TIMEOUT} scipy --numprocesses=auto
|
||||||
# Remove test remnants
|
# Remove test remnants
|
||||||
rm -rf gram{A,B}
|
rm -rf gram{A,B}
|
||||||
popd
|
popd
|
||||||
@ -173,6 +212,79 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jul 3 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1.8.1-5
|
||||||
|
- Fix linalg.lapack syevr segfault (#2099102)
|
||||||
|
|
||||||
|
* Fri Jun 17 2022 Python Maint <python-maint@redhat.com> - 1.8.1-4
|
||||||
|
- Rebuilt for Python 3.11
|
||||||
|
|
||||||
|
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 1.8.1-3
|
||||||
|
- Bootstrap for Python 3.11
|
||||||
|
|
||||||
|
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 1.8.1-2
|
||||||
|
- Rebuilt for Python 3.11
|
||||||
|
|
||||||
|
* Thu Jun 09 2022 Nikola Forró <nforro@redhat.com> - 1.8.1-1
|
||||||
|
- New upstream release 1.8.1
|
||||||
|
resolves: #2088437
|
||||||
|
|
||||||
|
* Sat Mar 26 2022 Nikola Forró <nforro@redhat.com> - 1.8.0-3
|
||||||
|
- Skip test_cython_api also on armv7hl
|
||||||
|
|
||||||
|
* Sat Mar 26 2022 Nikola Forró <nforro@redhat.com> - 1.8.0-2
|
||||||
|
- Disable pythran on armv7hl as well
|
||||||
|
|
||||||
|
* Mon Feb 07 2022 Nikola Forró <nforro@redhat.com> - 1.8.0-1
|
||||||
|
- New upstream release 1.8.0
|
||||||
|
resolves: #2035126
|
||||||
|
|
||||||
|
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Dec 21 2021 Nikola Forró <nforro@redhat.com> - 1.7.3-1
|
||||||
|
- New upstream release 1.7.3
|
||||||
|
resolves: #1988883
|
||||||
|
|
||||||
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 14 2021 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-2
|
||||||
|
- Use the optional Pythran build dependency
|
||||||
|
|
||||||
|
* Wed Jun 23 2021 Nikola Forró <nforro@redhat.com> - 1.7.0-1
|
||||||
|
- New upstream release 1.7.0
|
||||||
|
resolves: #1953422
|
||||||
|
|
||||||
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.6.2-4
|
||||||
|
- Rebuilt for Python 3.10
|
||||||
|
|
||||||
|
* Fri Apr 23 2021 Nikola Forró <nforro@redhat.com> - 1.6.2-3
|
||||||
|
- Remove RPATH from certain shared object files
|
||||||
|
|
||||||
|
* Tue Mar 30 2021 Jonathan Wakely <jwakely@redhat.com> - 1.6.2-2
|
||||||
|
- Rebuilt for removed libstdc++ symbol (#1937698)
|
||||||
|
|
||||||
|
* Thu Mar 25 2021 Nikola Forró <nforro@redhat.com> - 1.6.2-1
|
||||||
|
- New upstream release 1.6.2
|
||||||
|
resolves: #1942896
|
||||||
|
|
||||||
|
* Thu Feb 18 2021 Nikola Forró <nforro@redhat.com> - 1.6.1-1
|
||||||
|
- New upstream release 1.6.1
|
||||||
|
resolves: #1929994
|
||||||
|
|
||||||
|
* Wed Feb 03 2021 Nikola Forró <nforro@redhat.com> - 1.6.0-3
|
||||||
|
- Increase test timeout on s390x
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 04 2021 Nikola Forró <nforro@redhat.com> - 1.6.0-1
|
||||||
|
- New upstream release 1.6.0
|
||||||
|
resolves: #1906692
|
||||||
|
|
||||||
* Wed Nov 25 2020 Nikola Forró <nforro@redhat.com> - 1.5.4-2
|
* Wed Nov 25 2020 Nikola Forró <nforro@redhat.com> - 1.5.4-2
|
||||||
- Skip factorial() float tests on Python 3.10
|
- Skip factorial() float tests on Python 3.10
|
||||||
resolves: #1898157
|
resolves: #1898157
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
From ea0a77cf8761a8b8636b93314139ed0fc0a9d1db Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
|
|
||||||
Date: Wed, 30 Sep 2020 11:44:25 +0200
|
|
||||||
Subject: [PATCH] TST: make a couple of tests expected to fail on 32-bit
|
|
||||||
architectures
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
In TestConstructUtils.test_concatenate_int32_overflow
|
|
||||||
and test_nnz_overflow, on a 32-bit architecture, in case
|
|
||||||
check_free_memory() passes, ValueError is raised on an attempt
|
|
||||||
to create a numpy array too large for a 32-bit architecture.
|
|
||||||
|
|
||||||
Signed-off-by: Nikola Forró <nforro@redhat.com>
|
|
||||||
---
|
|
||||||
scipy/sparse/tests/test_construct.py | 1 +
|
|
||||||
scipy/sparse/tests/test_sparsetools.py | 1 +
|
|
||||||
2 files changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/scipy/sparse/tests/test_construct.py b/scipy/sparse/tests/test_construct.py
|
|
||||||
index 3a882c6cc..5a2b92667 100644
|
|
||||||
--- a/scipy/sparse/tests/test_construct.py
|
|
||||||
+++ b/scipy/sparse/tests/test_construct.py
|
|
||||||
@@ -378,6 +378,7 @@ class TestConstructUtils(object):
|
|
||||||
excinfo.match(r'Got blocks\[0,1\]\.shape\[0\] == 1, expected 2')
|
|
||||||
|
|
||||||
@pytest.mark.slow
|
|
||||||
+ @pytest.mark.xfail_on_32bit("Can't create large array for test")
|
|
||||||
def test_concatenate_int32_overflow(self):
|
|
||||||
""" test for indptr overflow when concatenating matrices """
|
|
||||||
check_free_memory(30000)
|
|
||||||
diff --git a/scipy/sparse/tests/test_sparsetools.py b/scipy/sparse/tests/test_sparsetools.py
|
|
||||||
index 0c208ef44..e95df1ba0 100644
|
|
||||||
--- a/scipy/sparse/tests/test_sparsetools.py
|
|
||||||
+++ b/scipy/sparse/tests/test_sparsetools.py
|
|
||||||
@@ -61,6 +61,7 @@ def test_regression_std_vector_dtypes():
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.slow
|
|
||||||
+@pytest.mark.xfail_on_32bit("Can't create large array for test")
|
|
||||||
def test_nnz_overflow():
|
|
||||||
# Regression test for gh-7230 / gh-7871, checking that coo_todense
|
|
||||||
# with nnz > int32max doesn't overflow.
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
From eabd8ea25fe291665f37fd069a1c574cd30d12cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Victor Stinner <vstinner@python.org>
|
|
||||||
Date: Wed, 25 Nov 2020 11:41:15 +0100
|
|
||||||
Subject: [PATCH] GH-13122: Skip factorial() float tests on Python 3.10
|
|
||||||
|
|
||||||
special.factorial() argument should be an array of integers.
|
|
||||||
On Python 3.10, math.factorial() reject float.
|
|
||||||
On Python 3.9, a DeprecationWarning is emitted.
|
|
||||||
A numpy array casts all integers to float if the array contains a
|
|
||||||
single NaN.
|
|
||||||
---
|
|
||||||
scipy/special/tests/test_basic.py | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/scipy/special/tests/test_basic.py b/scipy/special/tests/test_basic.py
|
|
||||||
index 9b7260e8435..e2ae29812a5 100644
|
|
||||||
--- a/scipy/special/tests/test_basic.py
|
|
||||||
+++ b/scipy/special/tests/test_basic.py
|
|
||||||
@@ -19,6 +19,7 @@
|
|
||||||
|
|
||||||
import itertools
|
|
||||||
import platform
|
|
||||||
+import sys
|
|
||||||
|
|
||||||
import numpy as np
|
|
||||||
from numpy import (array, isnan, r_, arange, finfo, pi, sin, cos, tan, exp,
|
|
||||||
@@ -1822,6 +1823,13 @@ def test_nan_inputs(self, x, exact):
|
|
||||||
result = special.factorial(x, exact=exact)
|
|
||||||
assert_(np.isnan(result))
|
|
||||||
|
|
||||||
+ # GH-13122: special.factorial() argument should be an array of integers.
|
|
||||||
+ # On Python 3.10, math.factorial() reject float.
|
|
||||||
+ # On Python 3.9, a DeprecationWarning is emitted.
|
|
||||||
+ # A numpy array casts all integers to float if the array contains a
|
|
||||||
+ # single NaN.
|
|
||||||
+ @pytest.mark.skipif(sys.version_info >= (3, 10),
|
|
||||||
+ reason="Python 3.10+ math.factorial() requires int")
|
|
||||||
def test_mixed_nan_inputs(self):
|
|
||||||
x = np.array([np.nan, 1, 2, 3, np.nan])
|
|
||||||
with suppress_warnings() as sup:
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (scipy-1.5.4.tar.gz) = d23f68911a8880f87767819750d4d175ba8f9c72fcb9b8080305ee65722c046d4485fde4f0c85cc53c46247dd99813afe675a38b3b0569a683ddc2c2e021b8fc
|
SHA512 (scipy-1.8.1.tar.gz) = f6fc71c209991fe82baa4b10d8ade0deb1057f6f5942a91dfb7ae45f3eb78a4535efa2861badf5e2d37239fa99dbd99de760aa7e4854b95991ade0263004e7ea
|
||||||
|
Loading…
Reference in New Issue
Block a user