File tree 3 files changed +3
-6
lines changed
3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,9 @@ include "hashtable_func_helper.pxi"
70
70
if np.dtype(np.intp) == np.dtype(np.int64):
71
71
IntpHashTable = Int64HashTable
72
72
unique_label_indices = _unique_label_indices_int64
73
- unique_label_indices_intp = _unique_label_indices_int64
74
73
elif np.dtype(np.intp) == np.dtype(np.int32):
75
74
IntpHashTable = Int32HashTable
76
- unique_label_indices = _unique_label_indices_int64
77
- unique_label_indices_intp = _unique_label_indices_int32
75
+ unique_label_indices = _unique_label_indices_int32
78
76
else :
79
77
raise ValueError (np.dtype(np.intp))
80
78
Original file line number Diff line number Diff line change @@ -261,8 +261,7 @@ def decons_obs_group_ids(
261
261
out = decons_group_index (obs_ids , shape )
262
262
return out if xnull or not lift .any () else [x - y for x , y in zip (out , lift )]
263
263
264
- # TODO: unique_label_indices only used here, should take ndarray[np.intp]
265
- indexer = unique_label_indices (ensure_int64 (comp_ids ))
264
+ indexer = unique_label_indices (comp_ids )
266
265
return [lab [indexer ].astype (np .intp , subok = False , copy = True ) for lab in labels ]
267
266
268
267
Original file line number Diff line number Diff line change @@ -1741,7 +1741,7 @@ def test_quantile():
1741
1741
1742
1742
def test_unique_label_indices ():
1743
1743
1744
- a = np .random .randint (1 , 1 << 10 , 1 << 15 ).astype ("int64" )
1744
+ a = np .random .randint (1 , 1 << 10 , 1 << 15 ).astype (np . intp )
1745
1745
1746
1746
left = ht .unique_label_indices (a )
1747
1747
right = np .unique (a , return_index = True )[1 ]
You can’t perform that action at this time.
0 commit comments