Skip to content

into_scalar() for 0-dimensional array views #688

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions