Skip to content

Commit facb5a0

Browse files
committed
fix: use the platform integer type
1 parent a13a949 commit facb5a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/awkward/_reducers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ def _dtype_for_kernel(cls, dtype: DTypeLike) -> DTypeLike:
6767
@classmethod
6868
def _promote_integer_rank(cls, given_dtype: DTypeLike) -> DTypeLike:
6969
if given_dtype in (np.bool_, np.int8, np.int16, np.int32):
70-
return np.int32 if cls._use32 else np.int64
70+
# Typically, np.intp is used to represent the platform integer type
71+
return np.int32 if cls._use32 else np.intp
7172

7273
elif given_dtype in (np.uint8, np.uint16, np.uint32):
73-
return np.uint32 if cls._use32 else np.uint64
74+
return np.uint32 if cls._use32 else np.intp
7475

7576
else:
7677
return given_dtype

0 commit comments

Comments
 (0)