File tree Expand file tree Collapse file tree 2 files changed +0
-53
lines changed Expand file tree Collapse file tree 2 files changed +0
-53
lines changed Original file line number Diff line number Diff line change @@ -250,54 +250,6 @@ def item_from_zerodim(val: object) -> object:
250
250
return val
251
251
252
252
253
- @ cython.wraparound (False )
254
- @ cython.boundscheck (False )
255
- def fast_unique_multiple (list arrays , sort: bool = True ):
256
- """
257
- Generate a list of unique values from a list of arrays.
258
-
259
- Parameters
260
- ----------
261
- list : array-like
262
- List of array-like objects.
263
- sort : bool
264
- Whether or not to sort the resulting unique list.
265
-
266
- Returns
267
- -------
268
- list of unique values
269
- """
270
- cdef:
271
- ndarray[object ] buf
272
- Py_ssize_t k = len (arrays)
273
- Py_ssize_t i, j, n
274
- list uniques = []
275
- dict table = {}
276
- object val, stub = 0
277
-
278
- for i in range (k):
279
- buf = arrays[i]
280
- n = len (buf)
281
- for j in range (n):
282
- val = buf[j]
283
- if val not in table:
284
- table[val] = stub
285
- uniques.append(val)
286
-
287
- if sort is None :
288
- try :
289
- uniques.sort()
290
- except TypeError :
291
- warnings.warn(
292
- " The values in the array are unorderable. "
293
- " Pass `sort=False` to suppress this warning." ,
294
- RuntimeWarning ,
295
- )
296
- pass
297
-
298
- return uniques
299
-
300
-
301
253
@ cython.wraparound (False )
302
254
@ cython.boundscheck (False )
303
255
def fast_unique_multiple_list (lists: list , sort: bool = True ) -> list:
Original file line number Diff line number Diff line change @@ -39,11 +39,6 @@ def test_fast_unique_multiple_list_gen_sort(self):
39
39
out = lib .fast_unique_multiple_list_gen (gen , sort = False )
40
40
tm .assert_numpy_array_equal (np .array (out ), expected )
41
41
42
- def test_fast_unique_multiple_unsortable_runtimewarning (self ):
43
- arr = [np .array (["foo" , Timestamp ("2000" )])]
44
- with tm .assert_produces_warning (RuntimeWarning ):
45
- lib .fast_unique_multiple (arr , sort = None )
46
-
47
42
48
43
class TestIndexing :
49
44
def test_maybe_indices_to_slice_left_edge (self ):
You can’t perform that action at this time.
0 commit comments