Skip to content

Indexing of zero-dimensional MArrays #580

@TheBB

Description

@TheBB

Zero-dimensional mutable arrays must implement an "empty" indexing method to work with some other functions, e.g. show:

julia> v = MArray{Tuple{},Int,0,1}(1)
0-dimensional MArray{Tuple{},Int64,0,1}:
Error showing value of type MArray{Tuple{},Int64,0,1}:
ERROR: ArgumentError: invalid index: () of type Tuple{}

This works for SArrays because they are specialized as "scalars", and this method is defined for them, but MArrays aren't.

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