Open
Description
Now repelemM(V, count)
where V
is a vector and count
is a scalar is supported.
Full support will be added when the following pull request is merged to Julia:
JuliaLang/julia#29560
Different tasks of this to do plan:
- Helping Pass vector of lengths to
repeat
; close #16443 JuliaLang/julia#29560 to be merged to Julia - Adding all needed methods to fully support
repelemM(V, count)
Achievement check:
mRepelem1 = repelemM([1 2 3 4], 3)
# should give:
[1 1 1 2 2 2 3 3 3 4 4 4]
mRepelem2 = repelemM([1 2 3 4], (3,2,1,1))
# should give:
[1 1 1 2 2 3 4]
mRepelem3 = repelemM([1 2; 3 4], 3, 2)
# should give:
[ 1 1 2 2 ;
1 1 2 2 ;
1 1 2 2 ;
3 3 4 4 ;
3 3 4 4 ;
3 3 4 4 ]
mRepelem4=repelemM([1 2; 3 4],1,[2 3])
# should give:
[1 1 2 2 2;
3 3 4 4 4]