We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51da3b1 commit 394aa53Copy full SHA for 394aa53
python/evalica/naive.py
@@ -1,6 +1,6 @@
1
from __future__ import annotations
2
3
-from typing import TYPE_CHECKING
+from typing import TYPE_CHECKING, cast
4
5
import numpy as np
6
import numpy.typing as npt
@@ -219,7 +219,7 @@ def pagerank_matrix(
219
if not matrix.shape[0]:
220
return np.zeros(0, dtype=np.float64)
221
222
- p = 1. / matrix.shape[0]
+ p = cast(float, 1. / matrix.shape[0])
223
224
matrix = matrix.T
225
matrix[matrix.sum(axis=1) == 0] = p
0 commit comments