summaryrefslogtreecommitdiff
path: root/dev-python/patsy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-11 12:25:19 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-11 12:25:19 +0100
commit496ef6155c315ac3628b472dc9b4146fa2684286 (patch)
treea0201d7a6c3a6e30410307544281465381970f4b /dev-python/patsy
parente810ac4a0e6af9f763f4433863042b34609075a7 (diff)
gentoo auto-resync : 11:07:2024 - 12:25:19
Diffstat (limited to 'dev-python/patsy')
-rw-r--r--dev-python/patsy/Manifest2
-rw-r--r--dev-python/patsy/files/patsy-0.5.6-np2.patch51
-rw-r--r--dev-python/patsy/patsy-0.5.6-r2.ebuild51
3 files changed, 104 insertions, 0 deletions
diff --git a/dev-python/patsy/Manifest b/dev-python/patsy/Manifest
index 06051555c9a2..b9b9b8caec0a 100644
--- a/dev-python/patsy/Manifest
+++ b/dev-python/patsy/Manifest
@@ -1,3 +1,5 @@
+AUX patsy-0.5.6-np2.patch 2286 BLAKE2B 6de304848b35df4d3d56785ec59c6ed5a769c561c395038652b65d1a406bab8671a6c1d886d44dfe6cd4c29e5452903003c02cd93733c448820edd7f03af29b9 SHA512 d645ce1a69ad03d8a630636ca2daea63bd6a0404e8210b370972c91e780d0dd490c2c452130b605834c8e81901e029214b11fc06de57ec1024d72759ffadd127
DIST patsy-0.5.6.tar.gz 398011 BLAKE2B c5fb15c57e270e3545cfdc8c13f8e745c94822be6684aa6703bdbc1da15ea63eb7a21d1e0bd1aaed2a4d919f4848fd9089dbcd3c304676e0a9512d13f94302bb SHA512 df73ddfa0e66088cb50133240e2d67e2a833d8f691e17b443cdc0661adf580eb8908b1e1082e8debd91439bbe7b990a9a455f16bd6773173c7e86273f2c1051b
EBUILD patsy-0.5.6-r1.ebuild 714 BLAKE2B 39dd3293790887f401d818f80f248e71da170b56f565c36b9addc0a2191e1f6ec6f2bb1e01c21a0f2b9a194678775d8c7a3c6afb73873863432be0210392a9d0 SHA512 eacbba93e62d7e4d60c472f17607a22c7a08826c596756c9b9aa324175781d3937bb8104bab0a149837fa8d50d8dcb8f72e4c5671beefdf1de064e1537ff083a
+EBUILD patsy-0.5.6-r2.ebuild 1060 BLAKE2B 3618195b6a248c3b22966f6641bfdc0e71b0f3ec7907de7cedb817c226081fe5d6e0fa0a71c13af7a74ef1c1ca0573cc15e117ccd79fbde9ebdd2856f5612810 SHA512 838ef5c7ba3b463231d479425096fc6e2c8f1f49844824ca96701ce5f5e56948388cf183f81a1c3676e0712a72cfa81b6bee4e92cd72e8888d4ac10f002322a1
MISC metadata.xml 732 BLAKE2B cf0e18d97605d69bae87a3553b89d551c03b908ec5a41da2ca11490cce6abd9aa6533d9155b7c19e3e12e5996aa8d5c3ea1f4cfb15e6c70916a4e2119fa54399 SHA512 f68d1e8645fee5af27d72062cc36b3700bff6c9f9eb6cb38a3b6c085211fb1b8502257d5d09edbd858e10ff4ef9f6661c577e336c3881e3c88e54d0db889a2b4
diff --git a/dev-python/patsy/files/patsy-0.5.6-np2.patch b/dev-python/patsy/files/patsy-0.5.6-np2.patch
new file mode 100644
index 000000000000..169eadb851fe
--- /dev/null
+++ b/dev-python/patsy/files/patsy-0.5.6-np2.patch
@@ -0,0 +1,51 @@
+diff --git a/patsy/highlevel.py b/patsy/highlevel.py
+index 78d2942..298739d 100644
+--- a/patsy/highlevel.py
++++ b/patsy/highlevel.py
+@@ -178,7 +178,7 @@ def _do_highlevel_design(formula_like, data, eval_env,
+ else:
+ # subok=True is necessary here to allow DesignMatrixes to pass
+ # through
+- (lhs, rhs) = (None, asarray_or_pandas(formula_like, subok=True))
++ (lhs, rhs) = (None, asarray_or_pandas(formula_like, subok=True, copy=None))
+ # some sort of explicit matrix or matrices were given. Currently we
+ # have them in one of these forms:
+ # -- an ndarray or subclass
+diff --git a/patsy/state.py b/patsy/state.py
+index 933c588..c489a4b 100644
+--- a/patsy/state.py
++++ b/patsy/state.py
+@@ -103,7 +103,7 @@ class Center(object):
+ pass
+
+ def transform(self, x):
+- x = asarray_or_pandas(x)
++ x = asarray_or_pandas(x, copy=None)
+ # This doesn't copy data unless our input is a DataFrame that has
+ # heterogeneous types. And in that case we're going to be munging the
+ # types anyway, so copying isn't a big deal.
+diff --git a/patsy/util.py b/patsy/util.py
+index 3116e11..7ac6f79 100644
+--- a/patsy/util.py
++++ b/patsy/util.py
+@@ -69,7 +69,7 @@ def asarray_or_pandas(a, copy=False, dtype=None, subok=False):
+
+ def test_asarray_or_pandas():
+ import warnings
+- assert type(asarray_or_pandas([1, 2, 3])) is np.ndarray
++ assert type(asarray_or_pandas([1, 2, 3], copy=True)) is np.ndarray
+ with warnings.catch_warnings() as w:
+ warnings.filterwarnings('ignore', 'the matrix subclass',
+ PendingDeprecationWarning)
+@@ -83,9 +83,9 @@ def test_asarray_or_pandas():
+ assert np.array_equal(a, a_copy)
+ a_copy[0] = 100
+ assert not np.array_equal(a, a_copy)
+- assert np.allclose(asarray_or_pandas([1, 2, 3], dtype=float),
++ assert np.allclose(asarray_or_pandas([1, 2, 3], dtype=float, copy=None),
+ [1.0, 2.0, 3.0])
+- assert asarray_or_pandas([1, 2, 3], dtype=float).dtype == np.dtype(float)
++ assert asarray_or_pandas([1, 2, 3], dtype=float, copy=None).dtype == np.dtype(float)
+ a_view = asarray_or_pandas(a, dtype=a.dtype)
+ a_view[0] = 99
+ assert a[0] == 99
diff --git a/dev-python/patsy/patsy-0.5.6-r2.ebuild b/dev-python/patsy/patsy-0.5.6-r2.ebuild
new file mode 100644
index 000000000000..4c8b9b9f9f05
--- /dev/null
+++ b/dev-python/patsy/patsy-0.5.6-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python module to describe statistical models and design matrices"
+HOMEPAGE="
+ https://patsy.readthedocs.io/en/latest/index.html
+ https://github.com/pydata/patsy/
+ https://pypi.org/project/patsy/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ !hppa? (
+ dev-python/scipy[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/pydata/patsy/issues/210
+ # ([probably] non-upstreamable hack)
+ "${FILESDIR}/${P}-np2.patch"
+)
+
+python_test() {
+ local EPYTEST_DESELECT=()
+
+ case ${EPYTHON} in
+ python3.13)
+ EPYTEST_DESELECT+=(
+ patsy/eval.py::test_EvalEnvironment_eq
+ )
+ ;;
+ esac
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest
+}