From 3558ea3b1c6950130b3ff5095773b75218276910 Mon Sep 17 00:00:00 2001 From: "Kevin J. Sung" Date: Tue, 20 Aug 2024 20:31:39 +0800 Subject: [PATCH] fix mypy --- python/ffsim/linalg/double_factorized_decomposition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ffsim/linalg/double_factorized_decomposition.py b/python/ffsim/linalg/double_factorized_decomposition.py index 50138157c..f8b807b89 100644 --- a/python/ffsim/linalg/double_factorized_decomposition.py +++ b/python/ffsim/linalg/double_factorized_decomposition.py @@ -34,7 +34,7 @@ def _truncated_eigh( indices = np.argsort(np.abs(eigs))[::-1] eigs = eigs[indices] vecs = vecs[:, indices] - n_discard = np.searchsorted(np.cumsum(np.abs(eigs[::-1])), tol) + n_discard = int(np.searchsorted(np.cumsum(np.abs(eigs[::-1])), tol)) n_vecs = cast(int, min(max_vecs, len(eigs) - n_discard)) return eigs[:n_vecs], vecs[:, :n_vecs]