Skip to content

Full repelemM support #4

Open
Open
@aminya

Description

@aminya

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:

  1. Helping Pass vector of lengths to repeat; close #16443 JuliaLang/julia#29560 to be merged to Julia
  2. 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] 
   

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions