Skip to content
Snippets Groups Projects
Commit 5ad48be5 authored by auphelia's avatar auphelia
Browse files

[Util] Change np.int to np.int_

parent 39006908
No related branches found
No related tags found
No related merge requests found
......@@ -91,8 +91,8 @@ def soft_verify_topk(invec, idxvec, k):
"""Check that the topK indices provided actually point to the topK largest
values in the input vector"""
np_topk = np.flip(invec.flatten().argsort())[:k]
soft_expected = invec.flatten()[np_topk.astype(np.int).flatten()]
soft_produced = invec.flatten()[idxvec.astype(np.int).flatten()]
soft_expected = invec.flatten()[np_topk.astype(np.int_).flatten()]
soft_produced = invec.flatten()[idxvec.astype(np.int_).flatten()]
return (soft_expected == soft_produced).all()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment