diff --git a/alibi_detect/cd/sklearn/classifier.py b/alibi_detect/cd/sklearn/classifier.py index 0fb817abf..dafb1942c 100644 --- a/alibi_detect/cd/sklearn/classifier.py +++ b/alibi_detect/cd/sklearn/classifier.py @@ -300,7 +300,7 @@ def _score_rf(self, x: Union[np.ndarray, list]) \ if isinstance(x, np.ndarray): x_oob = x[idx_oob] elif isinstance(x, list): - x_oob = [x[_] for _ in idx_oob] # type: ignore[assignment] + x_oob = [x[_] for _ in idx_oob] else: raise TypeError(f'x needs to be of type np.ndarray or list and not {type(x)}.') # comparison due to ordering in get_split (i.e, x = [x_ref, x]) diff --git a/alibi_detect/utils/perturbation.py b/alibi_detect/utils/perturbation.py index f2ad1de37..6c0940a5d 100644 --- a/alibi_detect/utils/perturbation.py +++ b/alibi_detect/utils/perturbation.py @@ -82,7 +82,7 @@ def apply_mask(X: np.ndarray, if mask_type == 'zero': update_val = 0 else: - update_val = noise[_] # type: ignore[assignment] + update_val = noise[_] for c in channels: mask[