Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ ERROR awkward_ListOffsetArray_drop_none_indexes(

for (int64_t i = 0; i < length_offsets; i++) {
offset2 = fromoffsets[i];
for (int j = offset1; j < offset2; j++) {
if (offset2 > length_indexes) {
Comment thread
ianna marked this conversation as resolved.
Outdated
return failure("offsets[i] > len(content)", i, kSliceNone, FILENAME(__LINE__));
}
for (int64_t j = offset1; j < offset2; j++) {
if (noneindexes[j] < 0) {
nr_of_nones++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ERROR awkward_ListOffsetArray_reduce_nonlocal_preparenext_64(
*maxnextparents = nextparents[k];
}

if (distincts[nextparents[k]] == -1) {
if (nextparents[k] < distinctslen && distincts[nextparents[k]] == -1) {
Comment thread
ikrommyd marked this conversation as resolved.
Outdated
distincts[nextparents[k]] = j;
j++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ERROR awkward_RecordArray_reduce_nonlocal_outoffsets_64(
}

// Replace unique value with index of appended empty lists
for (i = 0; i <= outlength; i++) {
for (i = 0; i < outlength; i++) {
Comment thread
ikrommyd marked this conversation as resolved.
if (outcarry[i] == -1) {
outcarry[i] = k_sublist++;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_1904_drop_none.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def test_List_ByteMaskedArray_NumpyArray():

def test_ListOffsetArray_ByteMaskedArray_NumpyArray():
a = ak.contents.listoffsetarray.ListOffsetArray(
ak.index.Index(np.array([1, 4, 4, 6, 7], np.int64)),
ak.index.Index(np.array([1, 4, 4, 5, 5], np.int64)),
ak.contents.bytemaskedarray.ByteMaskedArray(
ak.index.Index(np.array([1, 0, 1, 0, 1], np.int8)),
ak.contents.numpyarray.NumpyArray(np.array([1.1, 2.2, 3.3, 4.4, 5.5, 6.6])),
Expand Down
Loading