Skip to content

provide type-inferred length #138

Open
@bgctw

Description

@bgctw

A maybe-nice feature request.

Using StaticArrays.jl often helps avoiding allocation in bottle-neck code. When creating the StaticArray, the length or size must be known to the compiler.
ComponentArrays have this information in its type in its axes. However, currently length and size are based on the underlying array, for which the size might not be known at compile time.

I suggest implementing Base.length for an Axis and use this to implement Base.length and Base.size on getaxes(cv).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions