org.nd4j.linalg.util
Class NDArrayUtil
- java.lang.Object
-
- org.nd4j.linalg.util.NDArrayUtil
-
public class NDArrayUtil extends java.lang.ObjectBasic INDArray ops
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classNDArrayUtil.DimensionOpstatic classNDArrayUtil.MatrixOpstatic classNDArrayUtil.ScalarOp
-
Constructor Summary
Constructors Constructor and Description NDArrayUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static INDArraycenter(INDArray arr, int[] shape)Center an arraystatic INDArrayexp(INDArray toExp)static INDArrayexpi(INDArray toExp)Returns an exponential version of this ndarraystatic INDArraypadWithZeros(INDArray nd, int[] targetShape)Pads an INDArray with zerosstatic INDArraytruncate(INDArray nd, int n, int dimension)Truncates an INDArray to the specified shape.
-
-
-
Method Detail
-
expi
public static INDArray expi(INDArray toExp)
Returns an exponential version of this ndarray- Parameters:
toExp- the INDArray to convert- Returns:
- the converted ndarray
-
center
public static INDArray center(INDArray arr, int[] shape)
Center an array- Parameters:
arr- the arr to centershape- the shape of the array- Returns:
- the center portion of the array based on the specified shape
-
truncate
public static INDArray truncate(INDArray nd, int n, int dimension)
Truncates an INDArray to the specified shape. If the shape is the same or greater, it just returns the original array- Parameters:
nd- the INDArray to truncaten- the number of elements to truncate to- Returns:
- the truncated ndarray
-
-
DMelt 3.0 © DataMelt by jWork.ORG