Skip to content

Commit f86390b

Browse files
committed
Fixing mypy errors
1 parent 5c07205 commit f86390b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

autointent/modules/scoring/_dnnc/dnnc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def _get_cross_encoder_scores(self, utterances: list[str], candidates: list[list
252252

253253
flattened_cross_encoder_scores: npt.NDArray[np.float64] = self.model.predict(flattened_text_pairs)
254254
return [
255-
flattened_cross_encoder_scores[i : i + self.k].tolist()
255+
flattened_cross_encoder_scores[i : i + self.k].tolist() # type: ignore[misc]
256256
for i in range(0, len(flattened_cross_encoder_scores), self.k)
257257
]
258258

autointent/modules/scoring/_knn/weighting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,5 @@ def to_onehot(labels: NDArray[Any], n_classes: int) -> NDArray[Any]:
9595
new_shape = (*labels.shape, n_classes)
9696
onehot_labels = np.zeros(shape=new_shape)
9797
indices = (*tuple(np.indices(labels.shape)), labels)
98-
onehot_labels[indices] = 1
98+
onehot_labels[indices] = 1 # type: ignore[index]
9999
return onehot_labels

0 commit comments

Comments
 (0)