Skip to content

Constructor fails to create zero-dimensional StrideArray #28

@cafaxo

Description

@cafaxo

Zero dimensional stride arrays are somewhat supported:

julia> x = StrideArray(zeros(1))
1-element StrideArray{Float64, 1, (1,), Tuple{Int64}, Tuple{Nothing}, Tuple{StaticInt{1}}, Vector{Float64}}:
 0.0

julia> view(x, 1)
0-dimensional StrideArray{Float64, 0, (), Tuple{}, Tuple{}, Tuple{}, Vector{Float64}}:
0.0

But when I try to use the constructor, it does not work:

julia> StrideArray(zeros())
ERROR: ArgumentError: Cannot call tail on an empty tuple.

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