Class NDUtils


  • public final class NDUtils
    extends java.lang.Object
    A class containing utility methods for NDArray operations.
    • Method Detail

      • getShapeFromEmptyNDArrayForReductionOp

        public static Shape getShapeFromEmptyNDArrayForReductionOp​(Shape shape,
                                                                   int axis)
        Get Shape of the empty NDArray after applying reduction operations.
        Parameters:
        shape - input shape
        axis - axis to apply reduction
        Returns:
        the result Shape
      • checkConcatInput

        public static void checkConcatInput​(NDList list)
        Check two criteria of concat input: 1. no scalar 2. dimensions of all the array must be the same.
        Parameters:
        list - input NDList