Package ai.djl.ndarray.index.dim
Class NDIndexTake
- java.lang.Object
-
- ai.djl.ndarray.index.dim.NDIndexTake
-
- All Implemented Interfaces:
NDIndexElement
public class NDIndexTake extends java.lang.Object implements NDIndexElement
AnNDIndexElementthat gets elements by index in the specified axis.
-
-
Constructor Summary
Constructors Constructor Description NDIndexTake(NDArray index)Constructs a pick.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDArraygetIndex()Returns the index to pick.intgetRank()Returns the number of dimensions occupied by this index element.
-
-
-
Constructor Detail
-
NDIndexTake
public NDIndexTake(NDArray index)
Constructs a pick.- Parameters:
index- the index to pick
-
-
Method Detail
-
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
-
getIndex
public NDArray getIndex()
Returns the index to pick.- Returns:
- the index to pick
-
-