From 443d1d90448070ef8fd5ed462df6fae3b959173c Mon Sep 17 00:00:00 2001 From: Janis Klaise Date: Thu, 2 Nov 2023 09:57:15 +0000 Subject: [PATCH] Update typechecking for matplotlib 3.8.1 (#981) --- alibi/explainers/tests/test_partial_dependence.py | 2 +- alibi/utils/visualization.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alibi/explainers/tests/test_partial_dependence.py b/alibi/explainers/tests/test_partial_dependence.py index 7c75cff50..8f8799159 100644 --- a/alibi/explainers/tests/test_partial_dependence.py +++ b/alibi/explainers/tests/test_partial_dependence.py @@ -637,7 +637,7 @@ def assert_pd_ice_values(feature: int, target_idx: int, kind: str, explanation: line = ax.lines[0] if kind == 'average' else ax.lines[2] assert_pd_values(feature_values=explanation.data['feature_values'][feature], pd_values=explanation.data['pd_values'][feature][target_idx], - line=line) # type: ignore[arg-type] + line=line) if kind in ['individual', 'both']: # check the ice values diff --git a/alibi/utils/visualization.py b/alibi/utils/visualization.py index 83f681673..d60ad6965 100644 --- a/alibi/utils/visualization.py +++ b/alibi/utils/visualization.py @@ -354,7 +354,7 @@ def _create_heatmap(data: np.ndarray, plt.setp(ax.get_xticklabels(), rotation=90, ha="right", rotation_mode="anchor") # turn spines off and create white grid. - ax.spines[:].set_visible(False) # type: ignore[call-overload] + ax.spines[:].set_visible(False) ax.set_xticks(np.arange(data.shape[1]+1)-.5, minor=True) ax.set_yticks(np.arange(data.shape[0]+1)-.5, minor=True)