@@ -630,7 +630,9 @@ def _recurse_option_any(
630630 # Converting to an unknown inside an option!
631631 if isinstance (type_ .content , ak .types .UnknownType ):
632632 return ak .contents .IndexedOptionArray (
633- ak .index .Index64 (layout .backend .index_nplike .full (layout .length , - 1 )),
633+ ak .index .Index64 (
634+ layout .backend .index_nplike .full (layout .length , - 1 , dtype = np .int64 )
635+ ),
634636 ak .forms .from_type (type_ .content ).length_zero_array (
635637 backend = layout .backend
636638 ),
@@ -696,7 +698,9 @@ def _recurse_any_option(
696698 # Converting to an unknown inside an option!
697699 if isinstance (type_ .content , ak .types .UnknownType ):
698700 return ak .contents .IndexedOptionArray (
699- ak .index .Index64 (layout .backend .index_nplike .full (layout .length , - 1 )),
701+ ak .index .Index64 (
702+ layout .backend .index_nplike .full (layout .length , - 1 , dtype = np .int64 )
703+ ),
700704 ak .forms .from_type (type_ .content ).length_zero_array (backend = layout .backend ),
701705 )
702706 else :
@@ -1125,7 +1129,9 @@ def _recurse_record_any(
11251129 next_contents .append (
11261130 ak .contents .IndexedOptionArray (
11271131 ak .index .Index64 (
1128- layout .backend .index_nplike .full (layout .length , - 1 )
1132+ layout .backend .index_nplike .full (
1133+ layout .length , - 1 , dtype = np .int64
1134+ )
11291135 ),
11301136 ak .forms .from_type (next_type .content ).length_zero_array (
11311137 backend = layout .backend
@@ -1170,7 +1176,9 @@ def _recurse_record_any(
11701176 next_contents .append (
11711177 ak .contents .IndexedOptionArray (
11721178 ak .index .Index64 (
1173- layout .backend .index_nplike .full (layout .length , - 1 )
1179+ layout .backend .index_nplike .full (
1180+ layout .length , - 1 , dtype = np .int64
1181+ )
11741182 ),
11751183 ak .forms .from_type (field_type .content ).length_zero_array (
11761184 backend = layout .backend
0 commit comments