Skip to content

Commit 8d7ccbc

Browse files
dcheriansebastic
andauthored
32bit: More intp fixes (#202)
Co-authored-by: Bas Couwenberg <[email protected]> Co-authored-by: Bas Couwenberg <[email protected]>
1 parent 892af67 commit 8d7ccbc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_core.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,12 @@ def test_groupby_agg_dask(func, shape, array_chunks, group_chunks, add_nan, dtyp
393393
kwargs["expected_groups"] = [0, 2, 1]
394394
with raise_if_dask_computes():
395395
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))
397397
assert_equal(expected, actual[..., [0, 2, 1]])
398398

399399
with raise_if_dask_computes():
400400
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))
402402
assert_equal(expected, actual)
403403

404404

@@ -447,11 +447,11 @@ def test_dask_reduce_axis_subset():
447447
axis=1,
448448
expected_groups=[0, 2],
449449
)
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))
451451

452452
by = np.broadcast_to(labels2d, (3, *labels2d.shape))
453453
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)
455455
expected = np.tile(subarr, (3, 1, 1))
456456
with raise_if_dask_computes():
457457
result, _ = groupby_reduce(
@@ -464,7 +464,7 @@ def test_dask_reduce_axis_subset():
464464
)
465465
assert_equal(result, expected)
466466

467-
subarr = np.array([[2, 3], [2, 3]], dtype=np.int64)
467+
subarr = np.array([[2, 3], [2, 3]], dtype=np.intp)
468468
expected = np.tile(subarr, (3, 1, 1))
469469
with raise_if_dask_computes():
470470
result, _ = groupby_reduce(
@@ -801,7 +801,7 @@ def test_cohorts_map_reduce_consistent_dtypes(method, dtype, labels_dtype):
801801

802802
actual, actual_groups = groupby_reduce(array, labels, func="count", method=method)
803803
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))
805805

806806
actual, actual_groups = groupby_reduce(array, labels, func="sum", method=method)
807807
assert_equal(actual_groups, np.arange(6, dtype=labels.dtype))

0 commit comments

Comments
 (0)