arkouda
arkouda copied to clipboard
Investigate `peel(regex=True)` with single character strings and `pattern` matching empty string
Right now this is being caught on the client side and results in a ValueError
, but with the safeguarding removed something like the below will result in the server hanging.
ak.array(["t"]).peel('', regex=True)
I believe this edge case is being mishandled on our end since the chapel code for peel only used Regex.matches
which handles this case
use Regex;
writeln(compile('').matches('t'));
$ chpl PlayingAround.chpl -o playing
j$ ./playing
((matched = true, byteOffset = 0, numBytes = 0),) ((matched = true, byteOffset = 1, numBytes = 0),)