Skip to content

should similar(::ZeroDimensionalArray, ::Int) return Vector or FixedSizeVector? #4

@nsajko

Description

@nsajko

Currently similar falls back to returning Array:

julia> using ZeroDimensionalArrays

julia> a = ZeroDimensionalArrayImmutable(fill(false))
0-dimensional ZeroDimensionalArrayImmutable{Bool}:
0

julia> similar(a, 1)
1-element Vector{Bool}:
 0

julia> similar(a, 1, 1)
1×1 Matrix{Bool}:
 0

Perhaps it'd be nicer to return FixedSizeArray? That would require a dependency on FixedSizeArrays, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions