Skip to content

Commit

Permalink
fixed few points was caused by .view in unique_probs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhoeth committed Apr 27, 2023
1 parent 0f8ef62 commit 6b3b8d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simplebinmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


def get_unique_probs(x):
uniqueids = np.ascontiguousarray(x).view(np.dtype((np.void, x.dtype.itemsize * x.shape[1])))
uniqueids = np.ascontiguousarray(x)#.view(np.dtype((np.void, x.dtype.itemsize * x.shape[1])))
_, unique_inverse, unique_counts = np.unique(uniqueids, return_index=False, return_inverse=True, return_counts=True)
return np.asarray(unique_counts / float(sum(unique_counts))), unique_inverse

Expand Down

0 comments on commit 6b3b8d3

Please sign in to comment.