@@ -393,12 +393,12 @@ def test_groupby_agg_dask(func, shape, array_chunks, group_chunks, add_nan, dtyp
393
393
kwargs ["expected_groups" ] = [0 , 2 , 1 ]
394
394
with raise_if_dask_computes ():
395
395
actual , groups = groupby_reduce (array , by , engine = engine , ** kwargs , sort = False )
396
- assert_equal (groups , np .array ([0 , 2 , 1 ], dtype = np .intp ))
396
+ assert_equal (groups , np .array ([0 , 2 , 1 ], dtype = np .int64 ))
397
397
assert_equal (expected , actual [..., [0 , 2 , 1 ]])
398
398
399
399
with raise_if_dask_computes ():
400
400
actual , groups = groupby_reduce (array , by , engine = engine , ** kwargs , sort = True )
401
- assert_equal (groups , np .array ([0 , 1 , 2 ], np .intp ))
401
+ assert_equal (groups , np .array ([0 , 1 , 2 ], np .int64 ))
402
402
assert_equal (expected , actual )
403
403
404
404
@@ -447,11 +447,11 @@ def test_dask_reduce_axis_subset():
447
447
axis = 1 ,
448
448
expected_groups = [0 , 2 ],
449
449
)
450
- assert_equal (result , np .array ([[2 , 3 ], [2 , 3 ]], dtype = np .int64 ))
450
+ assert_equal (result , np .array ([[2 , 3 ], [2 , 3 ]], dtype = np .intp ))
451
451
452
452
by = np .broadcast_to (labels2d , (3 , * labels2d .shape ))
453
453
array = np .ones_like (by )
454
- subarr = np .array ([[1 , 1 ], [1 , 1 ], [123 , 2 ], [1 , 1 ], [1 , 1 ]], dtype = np .int64 )
454
+ subarr = np .array ([[1 , 1 ], [1 , 1 ], [123 , 2 ], [1 , 1 ], [1 , 1 ]], dtype = np .intp )
455
455
expected = np .tile (subarr , (3 , 1 , 1 ))
456
456
with raise_if_dask_computes ():
457
457
result , _ = groupby_reduce (
@@ -464,7 +464,7 @@ def test_dask_reduce_axis_subset():
464
464
)
465
465
assert_equal (result , expected )
466
466
467
- subarr = np .array ([[2 , 3 ], [2 , 3 ]], dtype = np .int64 )
467
+ subarr = np .array ([[2 , 3 ], [2 , 3 ]], dtype = np .intp )
468
468
expected = np .tile (subarr , (3 , 1 , 1 ))
469
469
with raise_if_dask_computes ():
470
470
result , _ = groupby_reduce (
@@ -801,7 +801,7 @@ def test_cohorts_map_reduce_consistent_dtypes(method, dtype, labels_dtype):
801
801
802
802
actual , actual_groups = groupby_reduce (array , labels , func = "count" , method = method )
803
803
assert_equal (actual_groups , np .arange (6 , dtype = labels .dtype ))
804
- assert_equal (actual , repeats .astype (np .int64 ))
804
+ assert_equal (actual , repeats .astype (np .intp ))
805
805
806
806
actual , actual_groups = groupby_reduce (array , labels , func = "sum" , method = method )
807
807
assert_equal (actual_groups , np .arange (6 , dtype = labels .dtype ))
0 commit comments