Package ai.djl.ndarray.index.full
Class NDIndexFullTake
- java.lang.Object
-
- ai.djl.ndarray.index.full.NDIndexFullTake
-
public final class NDIndexFullTake extends java.lang.ObjectA simplified representation of a take-basedNDIndex.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Optional<NDIndexFullTake>fromIndex(NDIndex index, Shape target)Returns (if possible) theNDIndexFullTakerepresentation of anNDIndex.intgetAxis()Returns the axis to take.NDArraygetIndices()Returns the indices to take.
-
-
-
Method Detail
-
fromIndex
public static java.util.Optional<NDIndexFullTake> fromIndex(NDIndex index, Shape target)
Returns (if possible) theNDIndexFullTakerepresentation of anNDIndex.- Parameters:
index- the index to representtarget- the shape of the array to index- Returns:
- the full take representation or nothing if it can't represent the index
-
getIndices
public NDArray getIndices()
Returns the indices to take.- Returns:
- the indices to take
-
getAxis
public int getAxis()
Returns the axis to take.- Returns:
- the axis to take
-
-