Package ai.djl.ndarray.index.dim
Class NDIndexPick
- java.lang.Object
-
- ai.djl.ndarray.index.dim.NDIndexPick
-
- All Implemented Interfaces:
NDIndexElement
public class NDIndexPick extends java.lang.Object implements NDIndexElement
AnNDIndexElementthat gets elements by index in the specified axis.
-
-
Constructor Summary
Constructors Constructor Description NDIndexPick(NDArray indices)Constructs a pick.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDArraygetIndices()Returns the indices to pick.intgetRank()Returns the number of dimensions occupied by this index element.
-
-
-
Constructor Detail
-
NDIndexPick
public NDIndexPick(NDArray indices)
Constructs a pick.- Parameters:
indices- the indices to pick
-
-
Method Detail
-
getRank
public int getRank()
Description copied from interface:NDIndexElementReturns the number of dimensions occupied by this index element.- Specified by:
getRankin interfaceNDIndexElement- Returns:
- the number of dimensions occupied by this index element
-
getIndices
public NDArray getIndices()
Returns the indices to pick.- Returns:
- the indices to pick
-
-