Skip to content

Question: Index Axis without Borrowing? #1006

@skailasa

Description

@skailasa

How does one idiomatically index elements of an array instance without borrowing the array? Can one just clone the given elements indexed? For example,

let column = matrix.index_axis(ndarray::Axis(1), 0);

takes ownership of the 'matrix' variable. How can I use matrix again, without cloning it? Again, a fairly noob question from a novice rust user!

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