We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f174869 commit cc55688Copy full SHA for cc55688
pandas/tests/test_algos.py
@@ -287,6 +287,23 @@ def test_complex_sorting(self):
287
288
self.assertRaises(TypeError, algos.factorize, x17[::-1], sort=True)
289
290
+ def test_uint64_factorize(self):
291
+ data = np.array([2**63, 1, 2**63], dtype=np.uint64)
292
+ exp_labels = np.array([0, 1, 0], dtype=np.intp)
293
+ exp_uniques = np.array([2**63, 1], dtype=np.uint64)
294
+
295
+ labels, uniques = algos.factorize(data)
296
+ tm.assert_numpy_array_equal(labels, exp_labels)
297
+ tm.assert_numpy_array_equal(uniques, exp_uniques)
298
299
+ data = np.array([2**63, -1, 2**63], dtype=object)
300
301
+ exp_uniques = np.array([2**63, -1], dtype=object)
302
303
304
305
306
307
308
class TestUnique(tm.TestCase):
309
_multiprocess_can_split_ = True
0 commit comments