Skip to content

Commit

Permalink
Fixes #3821: Bug in stridable indexing of Strings in multilocale (#3830)
Browse files Browse the repository at this point in the history
* Fixes #3821: Bug in stridable indexing of Strings in multilocale

This PR fixes #3821 which gave incorrect results for stridable index into segstrngs on multilocale

* remove test skip

---------

Co-authored-by: Tess Hayes <[email protected]>
Co-authored-by: ajpotts <[email protected]>
  • Loading branch information
3 people authored Oct 10, 2024
1 parent aaebded commit 842b51e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions src/SegmentedString.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,7 @@ module SegmentedString {

proc this(const slice: range(strides=strideKind.any)) throws {
var aa = makeDistArray(slice.size, int);
forall (elt,j) in zip(aa, slice) with (var agg = newSrcAggregator(int)) {
agg.copy(elt,j);
}
aa = slice;
return this[aa];
}

Expand Down
2 changes: 0 additions & 2 deletions tests/numpy/manipulation_functions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def test_flip_multi_dim_bool(self, size):
f2 = ak.broadcast(segments=segs, values=vals2, permutation=perm).reshape(shape)
assert_equal(f, f2)

# Currently there is a bug in the reverse indexing of Strings (#3821) that causes this test to fail.
@pytest.mark.skip("Skip until bug fix Ticket #3821 is completed.")
@pytest.mark.parametrize("size", pytest.prob_size)
def test_flip_string(self, size):
s = ak.random_strings_uniform(1, 2, size, seed=seed)
Expand Down

0 comments on commit 842b51e

Please sign in to comment.