Skip to content

Commit 394aa53

Browse files
committed
Fix typing
1 parent 51da3b1 commit 394aa53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/evalica/naive.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING
3+
from typing import TYPE_CHECKING, cast
44

55
import numpy as np
66
import numpy.typing as npt
@@ -219,7 +219,7 @@ def pagerank_matrix(
219219
if not matrix.shape[0]:
220220
return np.zeros(0, dtype=np.float64)
221221

222-
p = 1. / matrix.shape[0]
222+
p = cast(float, 1. / matrix.shape[0])
223223

224224
matrix = matrix.T
225225
matrix[matrix.sum(axis=1) == 0] = p

0 commit comments

Comments
 (0)