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