Class NDIndexBooleans

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

public class NDIndexBooleans extends Object implements NDIndexElement
An NDIndexElement to return values based on a mask binary NDArray.
  • Constructor Details

    • NDIndexBooleans

      public NDIndexBooleans(NDArray index)
      Constructs a NDIndexBooleans instance with specified mask binary NDArray.
      Parameters:
      index - the mask binary NDArray
  • Method Details

    • getIndex

      public NDArray getIndex()
      Returns the mask binary NDArray.
      Returns:
      the mask binary NDArray
    • 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