summaryrefslogtreecommitdiff
path: root/dev-python/statsmodels
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-python/statsmodels
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-python/statsmodels')
-rw-r--r--dev-python/statsmodels/Manifest4
-rw-r--r--dev-python/statsmodels/files/statsmodels-0.11.1-tests.patch35
-rw-r--r--dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch122
-rw-r--r--dev-python/statsmodels/metadata.xml2
4 files changed, 2 insertions, 161 deletions
diff --git a/dev-python/statsmodels/Manifest b/dev-python/statsmodels/Manifest
index 0e1396106611..5c3c4a819f3b 100644
--- a/dev-python/statsmodels/Manifest
+++ b/dev-python/statsmodels/Manifest
@@ -1,5 +1,3 @@
-AUX statsmodels-0.11.1-tests.patch 1915 BLAKE2B 90c13595a80cf1e59e81c483746f4b7e25bbb47d03211c39fda4dc9f441b03a9e793398d88e235ab53895e3d08cf97f7080d961317c4ea3fab04e011f0e5b64b SHA512 ec7f858b1af512d0bf591d35681b8663041e08e64a6e223e56cf600316a203259cd6386d2004bf884224608945b9e4938e9d39f8370d11c8914f6b773cd2773d
-AUX statsmodels-0.12.2-new-pandas-scipy.patch 4730 BLAKE2B 2543000c15af63874a8d23ce8ef998e5a29ec8a6181181d22f84691cd6e258749dc202140d73d663d0a9f16cec5097df93d2e40e832e324a391f45f91613ea44 SHA512 51393795a79dda5a7d2a02b4ff7c0a0c669559774114ce5aa7030393eb25747671569331dcc48be9cae7dd98d53a95fd0368dd999e35619295182ddc434c49c5
DIST statsmodels-0.13.2.tar.gz 17874260 BLAKE2B 93f7a308217ba938b3cd2e11d75e8f5ad19e2d4e6ab2abbea702143129bb53e7b9be54864375dbfec805624538bc73850357eb944d6c9a4c1252cc8a7606b904 SHA512 79d8dd63f667d4019e462d93e007a5ef8e11972fe35fb4d657931d6d68f3e35d29978a865682133db12fd6742f3362c2d77dfb5735c82ae454570388dd84d59a
EBUILD statsmodels-0.13.2.ebuild 2165 BLAKE2B 0ee013541fc993d9bdff9e0ddfb756beedae828680a2f94793ca723571ccd59659123398c3cbe4bc5d497760dd0712a96393a056ee1aa8d9eb50481dbd4bad63 SHA512 58a1c0605040d7dd217fbfea2595d96e3363f7229bde53d137de5cb0a0624ab73053649fb447220596b2e147c00f7d9a965d4b0ae9f01ddab63f72a43394a0f2
-MISC metadata.xml 1344 BLAKE2B 9bf8a6aea4058c34598e450ed56d15e86830819dafe3fadb98c0e9a986a431319291cdd48d6734014f99008d1ee4a434244e142b2412dc49eac74e312ab51f60 SHA512 e87e712b79b666ea207584ef647fb61dc9572a0a4ef2a94e9dd4eae30bca8347d12635fb568483dbbebc483238cfaacea155e7d9711617d7eff4e4624e738ad1
+MISC metadata.xml 1356 BLAKE2B 0eca47b1f489954f26e6a726216f678ea5f9284ce52c00df51117d3414c549e9e43f5f307cff8fc17eb897f00abeb23cdeb4f70c2ec594860875464e0955f13a SHA512 a59057a6fad33b7dddbf7ad1b822934c9f12a45a829bea039f8773c5c778639aa3273d623ec78df653cfb2c4e88355f4a8cb809f4cb80b9dd3e7616cd06cc376
diff --git a/dev-python/statsmodels/files/statsmodels-0.11.1-tests.patch b/dev-python/statsmodels/files/statsmodels-0.11.1-tests.patch
deleted file mode 100644
index 9a1a258d0779..000000000000
--- a/dev-python/statsmodels/files/statsmodels-0.11.1-tests.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -ur statsmodels-0.11.1.orig/statsmodels/base/tests/test_penalized.py statsmodels-0.11.1/statsmodels/base/tests/test_penalized.py
---- statsmodels-0.11.1.orig/statsmodels/base/tests/test_penalized.py 2020-04-28 22:02:47.150938650 -0700
-+++ statsmodels-0.11.1/statsmodels/base/tests/test_penalized.py 2020-04-28 22:03:24.468704937 -0700
-@@ -73,6 +73,7 @@
- y = np.random.poisson(mu)
- return y
-
-+ @pytest.mark.skip("Broken on all impls")
- def test_params_table(self):
- res1 = self.res1
- res2 = self.res2
-@@ -380,9 +381,6 @@
- bse = np.array([0.028126650444581985, 0.033099984564283147,
- 0.033184585514904545, 0.034282504130503301])
- assert_allclose(res2.params[:self.k_nonzero], params, atol=1e-5)
-- assert_allclose(res2.bse[:self.k_nonzero], bse, rtol=5e-6)
-- assert_allclose(res1.params[:self.k_nonzero], params, atol=1e-5)
-- assert_allclose(res1.bse[:self.k_nonzero], bse, rtol=5e-6)
-
-
- # the following classes are copies of Poisson with model adjustments
-Only in statsmodels-0.11.1/statsmodels/base/tests: test_penalized.py.orig
-diff -ur statsmodels-0.11.1.orig/statsmodels/tsa/statespace/tests/test_structural.py statsmodels-0.11.1/statsmodels/tsa/statespace/tests/test_structural.py
---- statsmodels-0.11.1.orig/statsmodels/tsa/statespace/tests/test_structural.py 2020-04-28 22:02:47.207938293 -0700
-+++ statsmodels-0.11.1/statsmodels/tsa/statespace/tests/test_structural.py 2020-04-28 22:04:02.871464429 -0700
-@@ -243,7 +243,7 @@
- run_ucm('rtrend_ar1', use_exact_diffuse=True)
-
-
--@pytest.mark.slow
-+@pytest.mark.skip("Fails")
- def test_lltrend_cycle_seasonal_reg_ar1(close_figures):
- run_ucm('lltrend_cycle_seasonal_reg_ar1_approx_diffuse')
- run_ucm('lltrend_cycle_seasonal_reg_ar1', use_exact_diffuse=True)
-Only in statsmodels-0.11.1/statsmodels/tsa/statespace/tests: .test_structural.py.un~
diff --git a/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch b/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch
deleted file mode 100644
index d11cd08ecf6f..000000000000
--- a/dev-python/statsmodels/files/statsmodels-0.12.2-new-pandas-scipy.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 4f32f3990fbba0ee440af47e23a9354fdb7a0285 Mon Sep 17 00:00:00 2001
-From: Kevin Sheppard <kevin.sheppard@gmail.com>
-Date: Fri, 12 Mar 2021 10:52:38 +0000
-Subject: [PATCH] MAINT: Fix issues arising from future changes
-
-Fix issues due to changes in SciPy and pandas
----
- statsmodels/regression/tests/test_rolling.py | 6 ++++--
- statsmodels/stats/descriptivestats.py | 8 +++++++-
- statsmodels/stats/stattools.py | 4 +++-
- 3 files changed, 14 insertions(+), 4 deletions(-)
-
-diff --git a/statsmodels/regression/tests/test_rolling.py b/statsmodels/regression/tests/test_rolling.py
-index 050de605f..f02e076d6 100644
---- a/statsmodels/regression/tests/test_rolling.py
-+++ b/statsmodels/regression/tests/test_rolling.py
-@@ -1,5 +1,6 @@
- from io import BytesIO
- from itertools import product
-+import warnings
-
- import numpy as np
- import pandas as pd
-@@ -261,8 +262,9 @@ def test_plot():
- res.plot_recursive_coefficient(variables="x4")
-
- fig = plt.Figure()
-- with pytest.warns(Warning):
-- # Just silence the warning
-+ # Just silence the warning
-+ with warnings.catch_warnings():
-+ warnings.simplefilter("ignore")
- out = res.plot_recursive_coefficient(fig=fig)
- assert out is fig
- res.plot_recursive_coefficient(alpha=None, figsize=(30, 7))
-diff --git a/statsmodels/stats/descriptivestats.py b/statsmodels/stats/descriptivestats.py
-index 96d455ca1..d5ad2f2a5 100644
---- a/statsmodels/stats/descriptivestats.py
-+++ b/statsmodels/stats/descriptivestats.py
-@@ -446,8 +446,14 @@ class Description:
- else:
- iqr = mean
-
-+ def _safe_jarque_bera(c):
-+ a = np.asarray(c)
-+ if a.shape[0] < 2:
-+ return (np.nan,) * 4
-+ return jarque_bera(a)
-+
- jb = df.apply(
-- lambda x: list(jarque_bera(x.dropna())), result_type="expand"
-+ lambda x: list(_safe_jarque_bera(x.dropna())), result_type="expand"
- ).T
- nan_mean = mean.copy()
- nan_mean.loc[nan_mean == 0] = np.nan
-diff --git a/statsmodels/stats/stattools.py b/statsmodels/stats/stattools.py
-index d349c472d..2ee1a6e0b 100644
---- a/statsmodels/stats/stattools.py
-+++ b/statsmodels/stats/stattools.py
-@@ -118,7 +118,9 @@ def jarque_bera(resids, axis=0):
- where n is the number of data points, S is the sample skewness, and K is
- the sample kurtosis of the data.
- """
-- resids = np.asarray(resids)
-+ resids = np.atleast_1d(np.asarray(resids, dtype=float))
-+ if resids.size < 2:
-+ raise ValueError("resids must contain at least 2 elements")
- # Calculate residual skewness and kurtosis
- skew = stats.skew(resids, axis=axis)
- kurtosis = 3 + stats.kurtosis(resids, axis=axis)
---
-2.32.0
-
-From a9e21aef508ea98da8c5889547b8e5748986dae1 Mon Sep 17 00:00:00 2001
-From: Kevin Sheppard <kevin.k.sheppard@gmail.com>
-Date: Wed, 7 Apr 2021 09:52:25 +0100
-Subject: [PATCH] MAINT: Fix descriptive stats with extension dtypes
-
-Add special path for extension dtypes to remove N/A
----
- statsmodels/stats/descriptivestats.py | 17 +++++++++++++++--
- 1 file changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/statsmodels/stats/descriptivestats.py b/statsmodels/stats/descriptivestats.py
-index d5ad2f2a5..0fd3eb542 100644
---- a/statsmodels/stats/descriptivestats.py
-+++ b/statsmodels/stats/descriptivestats.py
-@@ -441,8 +441,20 @@ class Description:
- loc = count > 0
- mode_freq = np.full(mode.shape[0], np.nan)
- mode_freq[loc] = mode_counts[loc] / count.loc[loc]
-+ # TODO: Workaround for pandas AbstractMethodError in extension
-+ # types. Remove when quantile is supported for these
-+ _df = df
-+ try:
-+ from pandas.api.types import is_extension_array_dtype
-+ _df = df.copy()
-+ for col in df:
-+ if is_extension_array_dtype(df[col].dtype):
-+ _df[col] = _df[col].astype(object).fillna(np.nan)
-+ except ImportError:
-+ pass
-+
- if df.shape[1] > 0:
-- iqr = df.quantile(0.75) - df.quantile(0.25)
-+ iqr = _df.quantile(0.75) - _df.quantile(0.25)
- else:
- iqr = mean
-
-@@ -493,7 +505,8 @@ class Description:
- return results_df
- # Pandas before 1.0 cannot handle empty DF
- if df.shape[1] > 0:
-- perc = df.quantile(self._percentiles / 100).astype(float)
-+ # TODO: Remove when extension types support quantile
-+ perc = _df.quantile(self._percentiles / 100).astype(float)
- else:
- perc = pd.DataFrame(index=self._percentiles / 100, dtype=float)
- if np.all(np.floor(100 * perc.index) == (100 * perc.index)):
---
-2.32.0
-
diff --git a/dev-python/statsmodels/metadata.xml b/dev-python/statsmodels/metadata.xml
index 468454c6be33..539db809506b 100644
--- a/dev-python/statsmodels/metadata.xml
+++ b/dev-python/statsmodels/metadata.xml
@@ -28,7 +28,7 @@
</longdescription>
<upstream>
<remote-id type="pypi">statsmodels</remote-id>
- <remote-id type="github">statsmodels</remote-id>
+ <remote-id type="github">statsmodels/statsmodels</remote-id>
<remote-id type="sourceforge">statsmodels</remote-id>
</upstream>
</pkgmetadata>