Skip to content

Can a static array be repeated into a static matrix using a similar repeat function in Julia? #967

Open
@Sonric

Description

@Sonric

My input is an array, and I want to use the static array to extend it into a large matrix to reduce the calculation time. However, after using the repeat() function in Julia, it changes back to the usual dynamic matrix, and there is no similar function after checking the document, is there any way to achieve this function?

Svals = @SVector [i for i = 1:1000]
repeat(Svals,1,50)

And I have tried the following code, but it didn't work.

SMatrix{length(vals),50}(repeat(vals,1,50))

Thanks!
Luo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions