Class NDIndexPick

java.lang.Object
ai.djl.ndarray.index.dim.NDIndexPick
All Implemented Interfaces:
NDIndexElement

public class NDIndexPick extends Object implements NDIndexElement
An NDIndexElement that gets elements by index in the specified axis.
  • Constructor Details

    • NDIndexPick

      public NDIndexPick(NDArray index)
      Constructs a pick.
      Parameters:
      index - the index to pick
  • Method Details

    • getRank

      public int getRank()
      Returns the number of dimensions occupied by this index element.
      Specified by:
      getRank in interface NDIndexElement
      Returns:
      the number of dimensions occupied by this index element
    • getIndex

      public NDArray getIndex()
      Returns the index to pick.
      Returns:
      the index to pick