Skip to content

into_scalar() for 0-dimensional array views #688

@Palladinium

Description

@Palladinium

Array0 has the handy into_scalar() method, which from what I gather roughly equates to calling arr.index(Ix0()).

Unfortunately, this isn't available for array views, so we're stuck using the more obscure and verbose syntax for ArrayView0 and ArrayViewMut0. It looks to me like it'd just be a matter to move the into_scalar() impl up to ArrayBase, letting the view representation choose the return type.

Would it be a breaking change? How difficult would it be to implement?

Metadata

Metadata

Assignees

No one assigned

    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