Documentation of 'org.nd4j.linalg.util.NDArrayUtil' Java class
NDArrayUtil
org.nd4j.linalg.util

Class NDArrayUtil



  • public class NDArrayUtil
    extends java.lang.Object
    Basic INDArray ops
    • Constructor Detail

      • NDArrayUtil

        public NDArrayUtil()
    • 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 center
        shape - 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 truncate
        n - the number of elements to truncate to
        Returns:
        the truncated ndarray
      • padWithZeros

        public static INDArray padWithZeros(INDArray nd,
                                            int[] targetShape)
        Pads an INDArray with zeros
        Parameters:
        nd - the INDArray to pad
        targetShape - the the new shape
        Returns:
        the padded ndarray

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.