Class NDIndexFullPick

java.lang.Object
ai.djl.ndarray.index.full.NDIndexFullPick

public final class NDIndexFullPick extends Object
A simplified representation of a pick-based NDIndex.
  • Method Details

    • fromIndex

      public static Optional<NDIndexFullPick> fromIndex(NDIndex index, Shape target)
      Returns (if possible) the NDIndexFullPick representation of an NDIndex.
      Parameters:
      index - the index to represent
      target - the shape of the array to index
      Returns:
      the full pick representation or nothing if it can't represent the index
    • getIndices

      public NDArray getIndices()
      Returns the indices to pick.
      Returns:
      the indices to pick
    • getAxis

      public int getAxis()
      Returns the axis to pick.
      Returns:
      the axis to pick