summaryrefslogtreecommitdiff
path: root/dev-python/numpy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-08-22 09:45:59 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-08-22 09:45:59 +0100
commit994ddedfa7bbe42aa3de4aa9ae3e58960bbdd94e (patch)
tree81561a97855bcb9d79784fb246dbdc9249d38274 /dev-python/numpy
parent102518876412b49c154cd247f5891927304dd8cc (diff)
gentoo auto-resync : 22:08:2023 - 09:45:59
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/Manifest2
-rw-r--r--dev-python/numpy/files/numpy-1.26.0_beta1-npy_cast_info.patch44
-rw-r--r--dev-python/numpy/numpy-1.26.0_beta1-r1.ebuild154
3 files changed, 200 insertions, 0 deletions
diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
index a8498ad7a85f..d5fdaa2653ba 100644
--- a/dev-python/numpy/Manifest
+++ b/dev-python/numpy/Manifest
@@ -3,6 +3,7 @@ AUX numpy-1.24.3-fix-c++-linkage.patch 993 BLAKE2B 9ad31b995b209ea0674ee144a72df
AUX numpy-1.25.0-skip-python3.12-irrelevant-tests.patch 7363 BLAKE2B ca4581f61fb1350803915bcc8e3198bd13c75e0c7e178c86e72682222cbafff396f23afad9d7427d9d2a4be625f84626c899493045a0b8cc7ee3d031d36712c3 SHA512 cce36c856beb2254436f2753ed94b7a933d1e4c06fe0a96c2be70d944f91bb13f3358f50981398d0b9169c0e01b64695c3adb797db15cb6b695488318e276886
AUX numpy-1.25.0_rc1-meson-pyproject.toml.patch 16917 BLAKE2B 6cdda647c1c4f003adcaff3d634cbaa2f6c1624f2e44bfff1b6542189693a1dc99bf8a3da38d5e9a5dd2b3a6382d0430f03eb3c39811cf3b72e85a1bbae9ea0e SHA512 0a51b1c84356704f373ba1188dc63152e45fdb7bc71881e8ab08b67bfbf2e8f1e9b5544eedf6e3d8b4b872e294e28233e9f059dfdad42ff835bba22ee66d0d93
AUX numpy-1.25.1-fix-scalartypes.patch 2745 BLAKE2B 97b80e877bf6d9036c0911b135869e2f3d0eab6828b4b1acdc957581d5a32063981b1aa688c46627cdb6f8be7fb839aadeb66012157e0f8f5e623e6d572441eb SHA512 144fd807dee3a844f8279cb7443ecd400862b257d36c42d6197c90514b8405c60466473436509983ed13ce9d23a137ef953ce21e3f4a2a2e16cb27a0fecb174a
+AUX numpy-1.26.0_beta1-npy_cast_info.patch 1783 BLAKE2B 2ac4c46a9a522b85796d9607b51806f13d529eeaf63bc04b7b5d1ad77c0743718933d0ac160e719900349f5a793be9c2f85b70ef82f9adb0c4c71300b27bc83b SHA512 cbf4556c608bd2f444233dc0622c4213cbf7b3b940ced45e2a418a3c0f5cc86c4d6f82e474c3527fad6fcd721d872b82fa24a6aa4c29e6bb4fb8660c881a7790
AUX replace_cpuflags.awk 405 BLAKE2B 1ac5f362a174793274a2e63fad73a7cf260b1fb139c479279c8cad7f400a376712b17312ee41defb785a7a2c84ec8e679aae48b41e88394a816f12f1cd366e56 SHA512 cce2253e00e2e56f3038782ff989703a9ef3d5f97d1b1f2570f6e23396d7abb7cff7f34588b67ec6c395cb192d7e3bfa6a8262ddf45193a2d0c91c2063efcf6d
DIST numpy-1.24.0.tar.gz 10897101 BLAKE2B 59e2b913f90de76589d8fbb2f07e2d389012c7f6ce9bd641bc4837776465ce9c41c34f19f92bee55d4bae6245c1d2c84315b359ef0b089fd68d31cd7e7ec44b1 SHA512 3b4e6255b8d39e8504a50ecd3c2ba09d5b16d3f6c70b23b67e4dbf03d1fe390c55030f46090341d39a1ee8228c61ad6212fdc6e4579fcec9e26b4dbe70268661
DIST numpy-1.24.2.tar.gz 10906862 BLAKE2B e48f65eab709f0c57ec378d813a7b65bcaca6d5960b559d6db1c60726e5cf12517f4b2e1636b0ff815a2109925edccba200270db5170fd0aff5fd635919165ac SHA512 145fd7fb3919a185f75076d51b92c54a7fb1b776b637752ca15fdee15b239d6a517ef1bb8cded7c92e059cf6cda0146c24943c042d19b791e81125bc0ad4b820
@@ -17,5 +18,6 @@ EBUILD numpy-1.24.4-r1.ebuild 5214 BLAKE2B 87986c0f034dcdbeffcb51ca3c90546b16fd1
EBUILD numpy-1.24.4.ebuild 4625 BLAKE2B c0fdf22a1accd3649917ea62e5d0f3d727c2225341ac9955bc581428e8d49df2d9d3a026626ebb88d0a099b2e10863b3c1e1173c03298a4d7ab74c38b0eb63d2 SHA512 a60ffab9872388691c79cce9478ee95a56e355498ea93d80cf6a0e07f1f46f4f6eaa1c5a33a447739d1b2000240c08da74376e924140b6eeac49695edf699704
EBUILD numpy-1.25.1-r3.ebuild 4444 BLAKE2B bc98460d27c6acd233ed219af855f93da93e6dd43db721195fd7e318256509145907136a1336f5d21c7252d05330eaf6b8f83f3f2bd4e4915d92ff447c57b564 SHA512 8dd4d5a3367d1260aa242558048d02da616695aa54f4b666b494d24aac7bef306bf7467fb73e6a7138f67086af51d3d191830a47c14b73062bf0836c345f4397
EBUILD numpy-1.25.2.ebuild 4985 BLAKE2B a1f37ea34bad04b6c82896d0ddfdab2fcf9b01411fcf5b76d04f87655ce31a7fa689726a41405a4c9ddd356fa9cd9389a9c497297667bf95a7342c95906c1384 SHA512 a24097b6c4a4ac55893ff3633655f6cf05fa21b1965e483129acaccfd73159f3e16e322260cde1986c6c7cc0a9ad9af298a995fabe305687cac36b1201d672f3
+EBUILD numpy-1.26.0_beta1-r1.ebuild 4224 BLAKE2B 90904364e576538fdb9e0b1818fbe523968eb92d94a670578e3a6ce2caef497f18d4f22abd5bfd437045a662e69a88cd5406efeb6f624607f227906975a55b38 SHA512 8f7966d86f514cf054798d2f7713dde10d3cdcac56fcb1553821793b1f08a4d898463808bceb6db963a104a22ad6a98af096f2f3ea66c9f17339b6023ee383f4
EBUILD numpy-1.26.0_beta1.ebuild 4116 BLAKE2B 2e5c723691678ce26459c9e4bacb8530f7694a7fab2255fb8c828cf8f1772e2bc26a98d3c2b6ceab535d8d80f9224f4b4b081d2a223aa82d01e6436589fde14e SHA512 d42ec9bcaeefb4b02ab7cae81e9d817bb418ab36252eb44cb327860a1982cf06dbd2132932fb1030f46c2eddc94f95717fdf6c87d19d93591bcce3234d7dd8e6
MISC metadata.xml 932 BLAKE2B 7a4af31f613bab05ff542da48bf6ff1484d9df2459f559516e71329451dd739d3df0fead507c8033d94ab9ed516b68efe7f21819a8cd6ca303643d8c8bc34e86 SHA512 32cb8c1ab61521a02cbec38f6ea383f074e50d46aa3462ddcb85710f9d348e8e628cf2a5725e3cd921cc32f02885a1b5f02125639f0ec885384eeeff7f468a06
diff --git a/dev-python/numpy/files/numpy-1.26.0_beta1-npy_cast_info.patch b/dev-python/numpy/files/numpy-1.26.0_beta1-npy_cast_info.patch
new file mode 100644
index 000000000000..cd09573deb7f
--- /dev/null
+++ b/dev-python/numpy/files/numpy-1.26.0_beta1-npy_cast_info.patch
@@ -0,0 +1,44 @@
+From 9cfb416aad45260e1cc837029638d6b39cea9e38 Mon Sep 17 00:00:00 2001
+From: Nathan Goldbaum <nathan.goldbaum@gmail.com>
+Date: Mon, 21 Aug 2023 15:45:11 -0600
+Subject: [PATCH] BUG: fix NPY_cast_info error handling in choose
+
+---
+ numpy/core/src/multiarray/item_selection.c | 2 +-
+ numpy/core/tests/test_multiarray.py | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/numpy/core/src/multiarray/item_selection.c b/numpy/core/src/multiarray/item_selection.c
+index e935a27edb6..c1d4a950815 100644
+--- a/numpy/core/src/multiarray/item_selection.c
++++ b/numpy/core/src/multiarray/item_selection.c
+@@ -968,6 +968,7 @@ PyArray_Choose(PyArrayObject *ip, PyObject *op, PyArrayObject *out,
+ PyArrayObject **mps, *ap;
+ PyArrayMultiIterObject *multi = NULL;
+ npy_intp mi;
++ NPY_cast_info cast_info = {.func = NULL};
+ ap = NULL;
+
+ /*
+@@ -1045,7 +1046,6 @@ PyArray_Choose(PyArrayObject *ip, PyObject *op, PyArrayObject *out,
+ npy_intp transfer_strides[2] = {elsize, elsize};
+ npy_intp one = 1;
+ NPY_ARRAYMETHOD_FLAGS transfer_flags = 0;
+- NPY_cast_info cast_info = {.func = NULL};
+ if (PyDataType_REFCHK(dtype)) {
+ int is_aligned = IsUintAligned(obj);
+ PyArray_GetDTypeTransferFunction(
+diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
+index 966b75cc122..2836c8985c9 100644
+--- a/numpy/core/tests/test_multiarray.py
++++ b/numpy/core/tests/test_multiarray.py
+@@ -10043,3 +10043,9 @@ def test_gh_22683():
+ np.choose(np.zeros(10000, dtype=int), [a], out=a)
+ refc_end = sys.getrefcount(b)
+ assert refc_end - refc_start < 10
++
++
++def test_gh_24459():
++ a = np.zeros((50, 3), dtype=np.float64)
++ with pytest.raises(TypeError):
++ np.choose(a, [3, -1])
diff --git a/dev-python/numpy/numpy-1.26.0_beta1-r1.ebuild b/dev-python/numpy/numpy-1.26.0_beta1-r1.ebuild
new file mode 100644
index 000000000000..1072d42ba823
--- /dev/null
+++ b/dev-python/numpy/numpy-1.26.0_beta1-r1.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=meson-python
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+FORTRAN_NEEDED=lapack
+
+inherit distutils-r1 flag-o-matic fortran-2 multiprocessing pypi toolchain-funcs
+
+DESCRIPTION="Fast array and numerical python library"
+HOMEPAGE="
+ https://numpy.org/
+ https://github.com/numpy/numpy/
+ https://pypi.org/project/numpy/
+"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="lapack"
+if [[ ${PV} != *_[rab]* ]] ; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+RDEPEND="
+ lapack? (
+ >=virtual/cblas-3.8
+ >=virtual/lapack-3.8
+ )
+"
+BDEPEND="
+ ${RDEPEND}
+ >=dev-util/meson-1.1.0
+ >=dev-python/cython-3.0.0[${PYTHON_USEDEP}]
+ lapack? (
+ virtual/pkgconfig
+ )
+ test? (
+ $(python_gen_cond_dep '
+ >=dev-python/cffi-1.14.0[${PYTHON_USEDEP}]
+ ' 'python*')
+ dev-python/charset-normalizer[${PYTHON_USEDEP}]
+ >=dev-python/hypothesis-5.8.0[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ >=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ local PATCHES=(
+ # https://github.com/numpy/numpy/pull/24484
+ "${FILESDIR}/${P}-npy_cast_info.patch"
+ )
+
+ append-flags -fno-strict-aliasing
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure_all() {
+ DISTUTILS_ARGS=(
+ -Dblas=$(usev lapack cblas)
+ -Dlapack=$(usev lapack lapack)
+ # TODO: cpu-* options
+ )
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # Very disk-and-memory-hungry
+ lib/tests/test_io.py::TestSaveTxt::test_large_zip
+ lib/tests/test_io.py::TestSavezLoad::test_closing_fid
+ lib/tests/test_io.py::TestSavezLoad::test_closing_zipfile_after_load
+
+ # Precision problems
+ core/tests/test_umath_accuracy.py::TestAccuracy::test_validate_transcendentals
+
+ # Runs the whole test suite recursively, that's just crazy
+ core/tests/test_mem_policy.py::test_new_policy
+
+ typing/tests/test_typing.py
+ # Uses huge amount of memory
+ core/tests/test_mem_overlap.py
+
+ # TODO: crashes
+ lib/tests/test_histograms.py::TestHistogram::test_big_arrays
+ )
+
+ if use arm && [[ $(uname -m || echo "unknown") == "armv8l" ]] ; then
+ # Degenerate case of arm32 chroot on arm64, bug #774108
+ EPYTEST_DESELECT+=(
+ core/tests/test_cpu_features.py::Test_ARM_Features::test_features
+ )
+ fi
+
+ if use x86 ; then
+ EPYTEST_DESELECT+=(
+ # https://github.com/numpy/numpy/issues/18388
+ core/tests/test_umath.py::TestRemainder::test_float_remainder_overflow
+ # https://github.com/numpy/numpy/issues/18387
+ random/tests/test_generator_mt19937.py::TestRandomDist::test_pareto
+ # more precision problems
+ core/tests/test_einsum.py::TestEinsum::test_einsum_sums_int16
+ )
+ fi
+
+ if use hppa ; then
+ EPYTEST_DESELECT+=(
+ # TODO: Get selectedrealkind updated!
+ # bug #907228
+ # https://github.com/numpy/numpy/issues/3424 (https://github.com/numpy/numpy/issues/3424#issuecomment-412369029)
+ # https://github.com/numpy/numpy/pull/21785
+ f2py/tests/test_kind.py::TestKind::test_real
+ f2py/tests/test_kind.py::TestKind::test_quad_precision
+ )
+ fi
+
+ if [[ $(tc-endian) == "big" ]] ; then
+ # https://github.com/numpy/numpy/issues/11831 and bug #707116
+ EPYTEST_DESELECT+=(
+ 'f2py/tests/test_return_character.py::TestFReturnCharacter::test_all_f77[s1]'
+ 'f2py/tests/test_return_character.py::TestFReturnCharacter::test_all_f90[t1]'
+ 'f2py/tests/test_return_character.py::TestFReturnCharacter::test_all_f90[s1]'
+ 'f2py/tests/test_return_character.py::TestFReturnCharacter::test_all_f77[t1]'
+ f2py/tests/test_kind.py::TestKind::test_int
+ )
+ fi
+
+ case "${ABI}" in
+ alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86)
+ EPYTEST_DESELECT+=(
+ # too large for 32-bit platforms
+ core/tests/test_ufunc.py::TestUfunc::test_identityless_reduction_huge_array
+ 'core/tests/test_multiarray.py::TestDot::test_huge_vectordot[float64]'
+ 'core/tests/test_multiarray.py::TestDot::test_huge_vectordot[complex128]'
+ )
+ ;;
+ *)
+ ;;
+ esac
+
+ rm -rf numpy || die
+ epytest -n "$(makeopts_jobs)" --pyargs numpy
+}
+
+python_install_all() {
+ local DOCS=( LICENSE.txt README.md THANKS.txt )
+ distutils-r1_python_install_all
+}