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
AnNDIndexElement
that 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 NDArray
getIndices()
Returns the indices to pick.int
getRank()
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:NDIndexElement
Returns the number of dimensions occupied by this index element.- Specified by:
getRank
in 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
-
-