Skip to content

Commit 894594c

Browse files
committed
fix: use type
1 parent facb5a0 commit 894594c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/awkward/_reducers.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,19 @@ def _dtype_for_kernel(cls, dtype: DTypeLike) -> DTypeLike:
6868
def _promote_integer_rank(cls, given_dtype: DTypeLike) -> DTypeLike:
6969
if given_dtype in (np.bool_, np.int8, np.int16, np.int32):
7070
# Typically, np.intp is used to represent the platform integer type
71-
return np.int32 if cls._use32 else np.intp
71+
return np.int32 if cls._use32 else np.dtype(np.intp).type
7272

7373
elif given_dtype in (np.uint8, np.uint16, np.uint32):
74-
return np.uint32 if cls._use32 else np.intp
74+
return np.uint32 if cls._use32 else np.dtype(np.uintp).type
7575

7676
else:
7777
return given_dtype
7878

79+
def get_platform_integer_dtype():
80+
# Typically, np.intp is used to represent the platform integer type
81+
return np.dtype(np.intp)
82+
83+
7984

8085
def apply_positional_corrections(
8186
reduced: ak.contents.NumpyArray,

0 commit comments

Comments
 (0)