-
| 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! | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            bluss
          
      
      
        May 17, 2021 
      
    
    Replies: 1 comment
-
| 
 | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        skailasa
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
index_axisdoesn't take ownership of matrix at all. Borrows, but does not take it. Check out all the methods calledindex_axis, the slicing methods and the general docs for them.