sci-ml/evaluate: fix for pandas-3

Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
Alfredo Tupone
2026-05-25 23:10:19 +02:00
parent 8000984cc7
commit 8e97a39df8
2 changed files with 16 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ RDEPEND="
dev-python/matplotlib[${PYTHON_USEDEP}]
dev-python/multiprocess[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/pandas[${PYTHON_USEDEP}]
>=dev-python/pandas-3[${PYTHON_USEDEP}]
dev-python/pyarrow[${PYTHON_USEDEP},parquet]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/tqdm[${PYTHON_USEDEP}]
@@ -59,7 +59,10 @@ BDEPEND="test? (
')
)"
PATCHES=( "${FILESDIR}"/${PN}-0.4.0-tests.patch )
PATCHES=(
"${FILESDIR}"/${PN}-0.4.0-tests.patch
"${FILESDIR}"/${P}-pandas3.patch
)
EPYTEST_PLUGINS=()
distutils_enable_tests pytest

View File

@@ -0,0 +1,11 @@
--- a/src/evaluate/visualization.py 2026-05-25 23:04:36.112310403 +0200
+++ b/src/evaluate/visualization.py 2026-05-25 23:05:32.135713980 +0200
@@ -225,6 +225,7 @@
format_cfg=format_cfg,
)
for g in zip(data.index):
- radar.plot(data.loc[g].values, label=g, marker=format_cfg["marker"], markersize=format_cfg["markersize"])
+ key = g[0] if isinstance(g, tuple) and len(g) == 1 else g
+ radar.plot(data.loc[key].values, label=key, marker=format_cfg["marker"], markersize=format_cfg["markersize"])
radar.use_legend(**{"loc": format_cfg["legend_loc"], "bbox_to_anchor": format_cfg["bbox_to_anchor"]})
return fig