Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Split boolean array into array for sets of trues and false

$
0
0

Is there a function that does something like this:

I have a Boolean array, e.g. input = [true,true,false,false,false,false,true,true,true,false,false,true]. I want to get a set of arrays for the corresponding regions of identical value, that is:
output=[[true,true],[false,false,false,false],[true,true,true],[false,false],[true]].

4 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles