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?
Array0has the handyinto_scalar()method, which from what I gather roughly equates to callingarr.index(Ix0()).Unfortunately, this isn't available for array views, so we're stuck using the more obscure and verbose syntax for
ArrayView0andArrayViewMut0. It looks to me like it'd just be a matter to move theinto_scalar()impl up toArrayBase, letting the view representation choose the return type.Would it be a breaking change? How difficult would it be to implement?