Package ai.djl.ndarray.index.dim
Class NDIndexBooleans
- java.lang.Object
-
- ai.djl.ndarray.index.dim.NDIndexBooleans
-
- All Implemented Interfaces:
NDIndexElement
public class NDIndexBooleans extends java.lang.Object implements NDIndexElement
AnNDIndexElementto return values based on a mask binary NDArray.
-
-
Constructor Summary
Constructors Constructor Description NDIndexBooleans(NDArray index)Constructs aNDIndexBooleansinstance with specified mask binary NDArray.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDArraygetIndex()Returns the mask binaryNDArray.intgetRank()Returns the number of dimensions occupied by this index element.
-
-
-
Constructor Detail
-
NDIndexBooleans
public NDIndexBooleans(NDArray index)
Constructs aNDIndexBooleansinstance with specified mask binary NDArray.- Parameters:
index- the mask binaryNDArray
-
-
Method Detail
-
getIndex
public NDArray getIndex()
Returns the mask binaryNDArray.- Returns:
- the mask binary
NDArray
-
getRank
public int getRank()
Returns the number of dimensions occupied by this index element.- Specified by:
getRankin interfaceNDIndexElement- Returns:
- the number of dimensions occupied by this index element
-
-