Skip to content

Commit 46ff82c

Browse files
author
MaartenGr
committed
Fix deprecated np.float
1 parent f79a278 commit 46ff82c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

polyfuzz/models/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def cosine_similarity(from_vector: np.ndarray,
8888

8989
indices = _top_n_idx_sparse(similarity_matrix, top_n)
9090
similarities = _top_n_similarities_sparse(similarity_matrix, indices)
91-
indices = np.array(np.nan_to_num(np.array(indices, dtype=np.float), nan=0), dtype=np.int)
91+
indices = np.array(np.nan_to_num(np.array(indices, dtype=np.float32), nan=0), dtype=np.int32)
9292

9393
# Faster than knn and slower than sparse but uses more memory
9494
else:

0 commit comments

Comments
 (0)