Skip to content

Constructing StaticArrays with generators or ntuple-like syntax #97

Open
@dpsanders

Description

@dpsanders

The following presumably creates a temporary:

julia> SVector(ntuple(i->i^2, 3))
3-element StaticArrays.SVector{3,Int64}:
 1
 4
 9

It would be great to be able to do

julia> SVector(i->i^2, 3)
3-element StaticArrays.SVector{3,Int64}:
 1
 4
 9

without creating the tuple temporary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designspeculative design related issuefeaturefeatures and feature requestsup for grabsImplement me, I'm yours!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions