Class StdArrays

java.lang.Object
org.tensorflow.ndarray.StdArrays

public final class StdArrays extends Object
Utility class for working with NdArray instances mixed with standard Java arrays.
  • Constructor Details

    • StdArrays

      public StdArrays()
  • Method Details

    • ndCopyOf

      public static IntNdArray ndCopyOf(int[] array)
      Copy an array of ints in a new IntNdArray
      Parameters:
      array - source array
      Returns:
      the IntNdArray copy
    • ndCopyOf

      public static IntNdArray ndCopyOf(int[][] array)
      Copy a 2-dimensional array of ints in a new IntNdArray
      Parameters:
      array - source array
      Returns:
      the IntNdArray copy
    • ndCopyOf

      public static IntNdArray ndCopyOf(int[][][] array)
      Copy a 3-dimensional array of ints in a new IntNdArray
      Parameters:
      array - source array
      Returns:
      the IntNdArray copy
    • ndCopyOf

      public static IntNdArray ndCopyOf(int[][][][] array)
      Copy a 4-dimensional array of ints in a new IntNdArray
      Parameters:
      array - source array
      Returns:
      the IntNdArray copy
    • ndCopyOf

      public static IntNdArray ndCopyOf(int[][][][][] array)
      Copy a 5-dimensional array of ints in a new IntNdArray
      Parameters:
      array - source array
      Returns:
      the IntNdArray copy
    • ndCopyOf

      public static IntNdArray ndCopyOf(int[][][][][][] array)
      Copy a 6-dimensional array of ints in a new IntNdArray
      Parameters:
      array - source array
      Returns:
      the IntNdArray copy
    • ndCopyOf

      public static LongNdArray ndCopyOf(long[] array)
      Copy an array of longs in a new LongNdArray
      Parameters:
      array - source array
      Returns:
      the LongNdArray copy
    • ndCopyOf

      public static LongNdArray ndCopyOf(long[][] array)
      Copy a 2-dimensional array of longs in a new LongNdArray
      Parameters:
      array - source array
      Returns:
      the LongNdArray copy
    • ndCopyOf

      public static LongNdArray ndCopyOf(long[][][] array)
      Copy a 3-dimensional array of longs in a new LongNdArray
      Parameters:
      array - source array
      Returns:
      the LongNdArray copy
    • ndCopyOf

      public static LongNdArray ndCopyOf(long[][][][] array)
      Copy a 4-dimensional array of longs in a new LongNdArray
      Parameters:
      array - source array
      Returns:
      the LongNdArray copy
    • ndCopyOf

      public static LongNdArray ndCopyOf(long[][][][][] array)
      Copy a 5-dimensional array of longs in a new LongNdArray
      Parameters:
      array - source array
      Returns:
      the LongNdArray copy
    • ndCopyOf

      public static LongNdArray ndCopyOf(long[][][][][][] array)
      Copy a 6-dimensional array of longs in a new LongNdArray
      Parameters:
      array - source array
      Returns:
      the LongNdArray copy
    • ndCopyOf

      public static FloatNdArray ndCopyOf(float[] array)
      Copy an array of floats in a new FloatNdArray
      Parameters:
      array - source array
      Returns:
      the FloatNdArray copy
    • ndCopyOf

      public static FloatNdArray ndCopyOf(float[][] array)
      Copy a 2-dimensional array of floats in a new FloatNdArray
      Parameters:
      array - source array
      Returns:
      the FloatNdArray copy
    • ndCopyOf

      public static FloatNdArray ndCopyOf(float[][][] array)
      Copy a 3-dimensional array of floats in a new FloatNdArray
      Parameters:
      array - source array
      Returns:
      the FloatNdArray copy
    • ndCopyOf

      public static FloatNdArray ndCopyOf(float[][][][] array)
      Copy a 4-dimensional array of floats in a new FloatNdArray
      Parameters:
      array - source array
      Returns:
      the FloatNdArray copy
    • ndCopyOf

      public static FloatNdArray ndCopyOf(float[][][][][] array)
      Copy a 5-dimensional array of floats in a new FloatNdArray
      Parameters:
      array - source array
      Returns:
      the FloatNdArray copy
    • ndCopyOf

      public static FloatNdArray ndCopyOf(float[][][][][][] array)
      Copy a 6-dimensional array of floats in a new FloatNdArray
      Parameters:
      array - source array
      Returns:
      the FloatNdArray copy
    • ndCopyOf

      public static DoubleNdArray ndCopyOf(double[] array)
      Copy an array of doubles in a new DoubleNdArray
      Parameters:
      array - source array
      Returns:
      the DoubleNdArray copy
    • ndCopyOf

      public static DoubleNdArray ndCopyOf(double[][] array)
      Copy a 2-dimensional array of doubles in a new DoubleNdArray
      Parameters:
      array - source array
      Returns:
      the DoubleNdArray copy
    • ndCopyOf

      public static DoubleNdArray ndCopyOf(double[][][] array)
      Copy a 3-dimensional array of doubles in a new DoubleNdArray
      Parameters:
      array - source array
      Returns:
      the DoubleNdArray copy
    • ndCopyOf

      public static DoubleNdArray ndCopyOf(double[][][][] array)
      Copy a 4-dimensional array of doubles in a new DoubleNdArray
      Parameters:
      array - source array
      Returns:
      the DoubleNdArray copy
    • ndCopyOf

      public static DoubleNdArray ndCopyOf(double[][][][][] array)
      Copy a 5-dimensional array of doubles in a new DoubleNdArray
      Parameters:
      array - source array
      Returns:
      the DoubleNdArray copy
    • ndCopyOf

      public static DoubleNdArray ndCopyOf(double[][][][][][] array)
      Copy a 6-dimensional array of doubles in a new DoubleNdArray
      Parameters:
      array - source array
      Returns:
      the DoubleNdArray copy
    • ndCopyOf

      public static ByteNdArray ndCopyOf(byte[] array)
      Copy an array of bytes in a new ByteNdArray
      Parameters:
      array - source array
      Returns:
      the ByteNdArray copy
    • ndCopyOf

      public static ByteNdArray ndCopyOf(byte[][] array)
      Copy a 2-dimensional array of bytes in a new ByteNdArray
      Parameters:
      array - source array
      Returns:
      the ByteNdArray copy
    • ndCopyOf

      public static ByteNdArray ndCopyOf(byte[][][] array)
      Copy a 3-dimensional array of bytes in a new ByteNdArray
      Parameters:
      array - source array
      Returns:
      the ByteNdArray copy
    • ndCopyOf

      public static ByteNdArray ndCopyOf(byte[][][][] array)
      Copy a 4-dimensional array of bytes in a new ByteNdArray
      Parameters:
      array - source array
      Returns:
      the ByteNdArray copy
    • ndCopyOf

      public static ByteNdArray ndCopyOf(byte[][][][][] array)
      Copy a 5-dimensional array of bytes in a new ByteNdArray
      Parameters:
      array - source array
      Returns:
      the ByteNdArray copy
    • ndCopyOf

      public static ByteNdArray ndCopyOf(byte[][][][][][] array)
      Copy a 6-dimensional array of bytes in a new ByteNdArray
      Parameters:
      array - source array
      Returns:
      the ByteNdArray copy
    • ndCopyOf

      public static ShortNdArray ndCopyOf(short[] array)
      Copy an array of shorts in a new ShortNdArray
      Parameters:
      array - source array
      Returns:
      the ShortNdArray copy
    • ndCopyOf

      public static ShortNdArray ndCopyOf(short[][] array)
      Copy a 2-dimensional array of shorts in a new ShortNdArray
      Parameters:
      array - source array
      Returns:
      the ShortNdArray copy
    • ndCopyOf

      public static ShortNdArray ndCopyOf(short[][][] array)
      Copy a 3-dimensional array of shorts in a new ShortNdArray
      Parameters:
      array - source array
      Returns:
      the ShortNdArray copy
    • ndCopyOf

      public static ShortNdArray ndCopyOf(short[][][][] array)
      Copy a 4-dimensional array of shorts in a new ShortNdArray
      Parameters:
      array - source array
      Returns:
      the ShortNdArray copy
    • ndCopyOf

      public static ShortNdArray ndCopyOf(short[][][][][] array)
      Copy a 5-dimensional array of shorts in a new ShortNdArray
      Parameters:
      array - source array
      Returns:
      the ShortNdArray copy
    • ndCopyOf

      public static ShortNdArray ndCopyOf(short[][][][][][] array)
      Copy a 6-dimensional array of shorts in a new ShortNdArray
      Parameters:
      array - source array
      Returns:
      the ShortNdArray copy
    • ndCopyOf

      public static BooleanNdArray ndCopyOf(boolean[] array)
      Copy an array of booleans in a new BooleanNdArray
      Parameters:
      array - source array
      Returns:
      the BooleanNdArray copy
    • ndCopyOf

      public static BooleanNdArray ndCopyOf(boolean[][] array)
      Copy a 2-dimensional array of booleans in a new BooleanNdArray
      Parameters:
      array - source array
      Returns:
      the BooleanNdArray copy
    • ndCopyOf

      public static BooleanNdArray ndCopyOf(boolean[][][] array)
      Copy a 3-dimensional array of booleans in a new BooleanNdArray
      Parameters:
      array - source array
      Returns:
      the BooleanNdArray copy
    • ndCopyOf

      public static BooleanNdArray ndCopyOf(boolean[][][][] array)
      Copy a 4-dimensional array of booleans in a new BooleanNdArray
      Parameters:
      array - source array
      Returns:
      the BooleanNdArray copy
    • ndCopyOf

      public static BooleanNdArray ndCopyOf(boolean[][][][][] array)
      Copy a 5-dimensional array of booleans in a new BooleanNdArray
      Parameters:
      array - source array
      Returns:
      the BooleanNdArray copy
    • ndCopyOf

      public static BooleanNdArray ndCopyOf(boolean[][][][][][] array)
      Copy a 6-dimensional array of booleans in a new BooleanNdArray
      Parameters:
      array - source array
      Returns:
      the BooleanNdArray copy
    • ndCopyOf

      public static <T> NdArray<T> ndCopyOf(T[] array)
      Copy an array of objects in a new NdArray
      Type Parameters:
      T - data type
      Parameters:
      array - source array
      Returns:
      the NdArray copy
    • ndCopyOf

      public static <T> NdArray<T> ndCopyOf(T[][] array)
      Copy a 2-dimensional array of objects in a new NdArray
      Type Parameters:
      T - data type
      Parameters:
      array - source array
      Returns:
      the NdArray copy
    • ndCopyOf

      public static <T> NdArray<T> ndCopyOf(T[][][] array)
      Copy a 3-dimensional array of objects in a new NdArray
      Type Parameters:
      T - data type
      Parameters:
      array - source array
      Returns:
      the NdArray copy
    • ndCopyOf

      public static <T> NdArray<T> ndCopyOf(T[][][][] array)
      Copy a 4-dimensional array of objects in a new NdArray
      Type Parameters:
      T - data type
      Parameters:
      array - source array
      Returns:
      the NdArray copy
    • ndCopyOf

      public static <T> NdArray<T> ndCopyOf(T[][][][][] array)
      Copy a 5-dimensional array of objects in a new NdArray
      Type Parameters:
      T - data type
      Parameters:
      array - source array
      Returns:
      the NdArray copy
    • ndCopyOf

      public static <T> NdArray<T> ndCopyOf(T[][][][][][] array)
      Copy a 6-dimensional array of objects in a new NdArray
      Type Parameters:
      T - data type
      Parameters:
      array - source array
      Returns:
      the NdArray copy
    • array1dCopyOf

      public static int[] array1dCopyOf(IntNdArray ndArray)
      Copy a IntNdArray in a new 1-dimension standard array of ints
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-1 or has a shape that exceeds standard arrays limits
    • array2dCopyOf

      public static int[][] array2dCopyOf(IntNdArray ndArray)
      Copy a IntNdArray in a new 2-dimension standard array of ints
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-2 or has a shape that exceeds standard arrays limits
    • array3dCopyOf

      public static int[][][] array3dCopyOf(IntNdArray ndArray)
      Copy a IntNdArray in a new 3-dimension standard array of ints
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-3 or has a shape that exceeds standard arrays limits
    • array4dCopyOf

      public static int[][][][] array4dCopyOf(IntNdArray ndArray)
      Copy a IntNdArray in a new 4-dimension standard array of ints
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-4 or has a shape that exceeds standard arrays limits
    • array5dCopyOf

      public static int[][][][][] array5dCopyOf(IntNdArray ndArray)
      Copy a IntNdArray in a new 5-dimension standard array of ints
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-5 or has a shape that exceeds standard arrays limits
    • array6dCopyOf

      public static int[][][][][][] array6dCopyOf(IntNdArray ndArray)
      Copy a IntNdArray in a new 6-dimension standard array of ints
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-6 or has a shape that exceeds standard arrays limits
    • array1dCopyOf

      public static long[] array1dCopyOf(LongNdArray ndArray)
      Copy a LongNdArray in a new 1-dimension standard array of longs
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-1 or has a shape that exceeds standard arrays limits
    • array2dCopyOf

      public static long[][] array2dCopyOf(LongNdArray ndArray)
      Copy a LongNdArray in a new 2-dimension standard array of longs
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-2 or has a shape that exceeds standard arrays limits
    • array3dCopyOf

      public static long[][][] array3dCopyOf(LongNdArray ndArray)
      Copy a LongNdArray in a new 3-dimension standard array of longs
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-3 or has a shape that exceeds standard arrays limits
    • array4dCopyOf

      public static long[][][][] array4dCopyOf(LongNdArray ndArray)
      Copy a LongNdArray in a new 4-dimension standard array of longs
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-4 or has a shape that exceeds standard arrays limits
    • array5dCopyOf

      public static long[][][][][] array5dCopyOf(LongNdArray ndArray)
      Copy a LongNdArray in a new 5-dimension standard array of longs
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-5 or has a shape that exceeds standard arrays limits
    • array6dCopyOf

      public static long[][][][][][] array6dCopyOf(LongNdArray ndArray)
      Copy a LongNdArray in a new 6-dimension standard array of longs
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-6 or has a shape that exceeds standard arrays limits
    • array1dCopyOf

      public static float[] array1dCopyOf(FloatNdArray ndArray)
      Copy a FloatNdArray in a new 1-dimension standard array of floats
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-1 or has a shape that exceeds standard arrays limits
    • array2dCopyOf

      public static float[][] array2dCopyOf(FloatNdArray ndArray)
      Copy a FloatNdArray in a new 2-dimension standard array of floats
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-2 or has a shape that exceeds standard arrays limits
    • array3dCopyOf

      public static float[][][] array3dCopyOf(FloatNdArray ndArray)
      Copy a FloatNdArray in a new 3-dimension standard array of floats
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-3 or has a shape that exceeds standard arrays limits
    • array4dCopyOf

      public static float[][][][] array4dCopyOf(FloatNdArray ndArray)
      Copy a FloatNdArray in a new 4-dimension standard array of floats
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-4 or has a shape that exceeds standard arrays limits
    • array5dCopyOf

      public static float[][][][][] array5dCopyOf(FloatNdArray ndArray)
      Copy a FloatNdArray in a new 5-dimension standard array of floats
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-5 or has a shape that exceeds standard arrays limits
    • array6dCopyOf

      public static float[][][][][][] array6dCopyOf(FloatNdArray ndArray)
      Copy a FloatNdArray in a new 6-dimension standard array of floats
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-6 or has a shape that exceeds standard arrays limits
    • array1dCopyOf

      public static double[] array1dCopyOf(DoubleNdArray ndArray)
      Copy a DoubleNdArray in a new 1-dimension standard array of doubles
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-1 or has a shape that exceeds standard arrays limits
    • array2dCopyOf

      public static double[][] array2dCopyOf(DoubleNdArray ndArray)
      Copy a DoubleNdArray in a new 2-dimension standard array of doubles
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-2 or has a shape that exceeds standard arrays limits
    • array3dCopyOf

      public static double[][][] array3dCopyOf(DoubleNdArray ndArray)
      Copy a DoubleNdArray in a new 3-dimension standard array of doubles
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-3 or has a shape that exceeds standard arrays limits
    • array4dCopyOf

      public static double[][][][] array4dCopyOf(DoubleNdArray ndArray)
      Copy a DoubleNdArray in a new 4-dimension standard array of doubles
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-4 or has a shape that exceeds standard arrays limits
    • array5dCopyOf

      public static double[][][][][] array5dCopyOf(DoubleNdArray ndArray)
      Copy a DoubleNdArray in a new 5-dimension standard array of doubles
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-5 or has a shape that exceeds standard arrays limits
    • array6dCopyOf

      public static double[][][][][][] array6dCopyOf(DoubleNdArray ndArray)
      Copy a DoubleNdArray in a new 6-dimension standard array of doubles
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-6 or has a shape that exceeds standard arrays limits
    • array1dCopyOf

      public static byte[] array1dCopyOf(ByteNdArray ndArray)
      Copy a ByteNdArray in a new 1-dimension standard array of bytes
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-1 or has a shape that exceeds standard arrays limits
    • array2dCopyOf

      public static byte[][] array2dCopyOf(ByteNdArray ndArray)
      Copy a ByteNdArray in a new 2-dimension standard array of bytes
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-2 or has a shape that exceeds standard arrays limits
    • array3dCopyOf

      public static byte[][][] array3dCopyOf(ByteNdArray ndArray)
      Copy a ByteNdArray in a new 3-dimension standard array of bytes
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-3 or has a shape that exceeds standard arrays limits
    • array4dCopyOf

      public static byte[][][][] array4dCopyOf(ByteNdArray ndArray)
      Copy a ByteNdArray in a new 4-dimension standard array of bytes
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-4 or has a shape that exceeds standard arrays limits
    • array5dCopyOf

      public static byte[][][][][] array5dCopyOf(ByteNdArray ndArray)
      Copy a ByteNdArray in a new 5-dimension standard array of bytes
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-5 or has a shape that exceeds standard arrays limits
    • array6dCopyOf

      public static byte[][][][][][] array6dCopyOf(ByteNdArray ndArray)
      Copy a ByteNdArray in a new 6-dimension standard array of bytes
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-6 or has a shape that exceeds standard arrays limits
    • array1dCopyOf

      public static short[] array1dCopyOf(ShortNdArray ndArray)
      Copy a ShortNdArray in a new 1-dimension standard array of shorts
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-1 or has a shape that exceeds standard arrays limits
    • array2dCopyOf

      public static short[][] array2dCopyOf(ShortNdArray ndArray)
      Copy a ShortNdArray in a new 2-dimension standard array of shorts
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-2 or has a shape that exceeds standard arrays limits
    • array3dCopyOf

      public static short[][][] array3dCopyOf(ShortNdArray ndArray)
      Copy a ShortNdArray in a new 3-dimension standard array of shorts
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-3 or has a shape that exceeds standard arrays limits
    • array4dCopyOf

      public static short[][][][] array4dCopyOf(ShortNdArray ndArray)
      Copy a ShortNdArray in a new 4-dimension standard array of shorts
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-4 or has a shape that exceeds standard arrays limits
    • array5dCopyOf

      public static short[][][][][] array5dCopyOf(ShortNdArray ndArray)
      Copy a ShortNdArray in a new 5-dimension standard array of shorts
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-5 or has a shape that exceeds standard arrays limits
    • array6dCopyOf

      public static short[][][][][][] array6dCopyOf(ShortNdArray ndArray)
      Copy a ShortNdArray in a new 6-dimension standard array of shorts
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-6 or has a shape that exceeds standard arrays limits
    • array1dCopyOf

      public static boolean[] array1dCopyOf(BooleanNdArray ndArray)
      Copy a BooleanNdArray in a new 1-dimension standard array of booleans
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-1 or has a shape that exceeds standard arrays limits
    • array2dCopyOf

      public static boolean[][] array2dCopyOf(BooleanNdArray ndArray)
      Copy a BooleanNdArray in a new 2-dimension standard array of booleans
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-2 or has a shape that exceeds standard arrays limits
    • array3dCopyOf

      public static boolean[][][] array3dCopyOf(BooleanNdArray ndArray)
      Copy a BooleanNdArray in a new 3-dimension standard array of booleans
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-3 or has a shape that exceeds standard arrays limits
    • array4dCopyOf

      public static boolean[][][][] array4dCopyOf(BooleanNdArray ndArray)
      Copy a BooleanNdArray in a new 4-dimension standard array of booleans
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-4 or has a shape that exceeds standard arrays limits
    • array5dCopyOf

      public static boolean[][][][][] array5dCopyOf(BooleanNdArray ndArray)
      Copy a BooleanNdArray in a new 5-dimension standard array of booleans
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-5 or has a shape that exceeds standard arrays limits
    • array6dCopyOf

      public static boolean[][][][][][] array6dCopyOf(BooleanNdArray ndArray)
      Copy a BooleanNdArray in a new 6-dimension standard array of booleans
      Parameters:
      ndArray - source array
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-6 or has a shape that exceeds standard arrays limits
    • array1dCopyOf

      public static <T> T[] array1dCopyOf(NdArray<T> ndArray, Class<T> objectType)
      Copy a NdArray<T> in a new 1-dimension standard array of objects
      Type Parameters:
      T - data type
      Parameters:
      ndArray - source array
      objectType - type of object
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-1 or has a shape that exceeds standard arrays limits
    • array2dCopyOf

      public static <T> T[][] array2dCopyOf(NdArray<T> ndArray, Class<T> objectType)
      Copy a NdArray<T> in a new 2-dimension standard array of objects
      Type Parameters:
      T - data type
      Parameters:
      ndArray - source array
      objectType - type of object
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-2 or has a shape that exceeds standard arrays limits
    • array3dCopyOf

      public static <T> T[][][] array3dCopyOf(NdArray<T> ndArray, Class<T> objectType)
      Copy a NdArray<T> in a new 3-dimension standard array of objects
      Type Parameters:
      T - data type
      Parameters:
      ndArray - source array
      objectType - type of object
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-3 or has a shape that exceeds standard arrays limits
    • array4dCopyOf

      public static <T> T[][][][] array4dCopyOf(NdArray<T> ndArray, Class<T> objectType)
      Copy a NdArray<T> in a new 4-dimension standard array of objects
      Type Parameters:
      T - data type
      Parameters:
      ndArray - source array
      objectType - type of object
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-4 or has a shape that exceeds standard arrays limits
    • array5dCopyOf

      public static <T> T[][][][][] array5dCopyOf(NdArray<T> ndArray, Class<T> objectType)
      Copy a NdArray<T> in a new 5-dimension standard array of objects
      Type Parameters:
      T - data type
      Parameters:
      ndArray - source array
      objectType - type of object
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-5 or has a shape that exceeds standard arrays limits
    • array6dCopyOf

      public static <T> T[][][][][][] array6dCopyOf(NdArray<T> ndArray, Class<T> objectType)
      Copy a NdArray<T> in a new 6-dimension standard array of objects
      Type Parameters:
      T - data type
      Parameters:
      ndArray - source array
      objectType - type of object
      Returns:
      the array copy
      Throws:
      IllegalArgumentException - if ndArray is not of rank-6 or has a shape that exceeds standard arrays limits
    • copyTo

      public static void copyTo(int[] src, IntNdArray dst)
      Copy an array of ints into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-1 array
      Throws:
      IllegalArgumentException - if dst is not of rank-1 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(int[][] src, IntNdArray dst)
      Copy a 2-dimensional array of ints into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-2 array
      Throws:
      IllegalArgumentException - if dst is not of rank-2 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(int[][][] src, IntNdArray dst)
      Copy a 3-dimensional array of ints into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-3 array
      Throws:
      IllegalArgumentException - if dst is not of rank-3 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(int[][][][] src, IntNdArray dst)
      Copy a 4-dimensional array of ints into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-4 array
      Throws:
      IllegalArgumentException - if dst is not of rank-4 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(int[][][][][] src, IntNdArray dst)
      Copy a 5-dimensional array of ints into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-5 array
      Throws:
      IllegalArgumentException - if dst is not of rank-5 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(int[][][][][][] src, IntNdArray dst)
      Copy a 6-dimensional array of ints into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-6 array
      Throws:
      IllegalArgumentException - if dst is not of rank-6 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(long[] src, LongNdArray dst)
      Copy an array of longs into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-1 array
      Throws:
      IllegalArgumentException - if dst is not of rank-1 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(long[][] src, LongNdArray dst)
      Copy a 2-dimensional array of longs into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-2 array
      Throws:
      IllegalArgumentException - if dst is not of rank-2 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(long[][][] src, LongNdArray dst)
      Copy a 3-dimensional array of longs into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-3 array
      Throws:
      IllegalArgumentException - if dst is not of rank-3 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(long[][][][] src, LongNdArray dst)
      Copy a 4-dimensional array of longs into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-4 array
      Throws:
      IllegalArgumentException - if dst is not of rank-4 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(long[][][][][] src, LongNdArray dst)
      Copy a 5-dimensional array of longs into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-5 array
      Throws:
      IllegalArgumentException - if dst is not of rank-5 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(long[][][][][][] src, LongNdArray dst)
      Copy a 6-dimensional array of longs into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-6 array
      Throws:
      IllegalArgumentException - if dst is not of rank-6 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(float[] src, FloatNdArray dst)
      Copy an array of floats into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-1 array
      Throws:
      IllegalArgumentException - if dst is not of rank-1 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(float[][] src, FloatNdArray dst)
      Copy a 2-dimensional array of floats into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-2 array
      Throws:
      IllegalArgumentException - if dst is not of rank-2 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(float[][][] src, FloatNdArray dst)
      Copy a 3-dimensional array of floats into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-3 array
      Throws:
      IllegalArgumentException - if dst is not of rank-3 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(float[][][][] src, FloatNdArray dst)
      Copy a 4-dimensional array of floats into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-4 array
      Throws:
      IllegalArgumentException - if dst is not of rank-4 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(float[][][][][] src, FloatNdArray dst)
      Copy a 5-dimensional array of floats into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-5 array
      Throws:
      IllegalArgumentException - if dst is not of rank-5 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(float[][][][][][] src, FloatNdArray dst)
      Copy a 6-dimensional array of floats into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-6 array
      Throws:
      IllegalArgumentException - if dst is not of rank-6 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(double[] src, DoubleNdArray dst)
      Copy an array of doubles into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-1 array
      Throws:
      IllegalArgumentException - if dst is not of rank-1 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(double[][] src, DoubleNdArray dst)
      Copy a 2-dimensional array of doubles into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-2 array
      Throws:
      IllegalArgumentException - if dst is not of rank-2 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(double[][][] src, DoubleNdArray dst)
      Copy a 3-dimensional array of doubles into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-3 array
      Throws:
      IllegalArgumentException - if dst is not of rank-3 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(double[][][][] src, DoubleNdArray dst)
      Copy a 4-dimensional array of doubles into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-4 array
      Throws:
      IllegalArgumentException - if dst is not of rank-4 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(double[][][][][] src, DoubleNdArray dst)
      Copy a 5-dimensional array of doubles into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-5 array
      Throws:
      IllegalArgumentException - if dst is not of rank-5 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(double[][][][][][] src, DoubleNdArray dst)
      Copy a 6-dimensional array of doubles into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-6 array
      Throws:
      IllegalArgumentException - if dst is not of rank-6 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(byte[] src, ByteNdArray dst)
      Copy an array of bytes into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-1 array
      Throws:
      IllegalArgumentException - if dst is not of rank-1 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(byte[][] src, ByteNdArray dst)
      Copy a 2-dimensional array of bytes into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-2 array
      Throws:
      IllegalArgumentException - if dst is not of rank-2 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(byte[][][] src, ByteNdArray dst)
      Copy a 3-dimensional array of bytes into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-3 array
      Throws:
      IllegalArgumentException - if dst is not of rank-3 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(byte[][][][] src, ByteNdArray dst)
      Copy a 4-dimensional array of bytes into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-4 array
      Throws:
      IllegalArgumentException - if dst is not of rank-4 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(byte[][][][][] src, ByteNdArray dst)
      Copy a 5-dimensional array of bytes into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-5 array
      Throws:
      IllegalArgumentException - if dst is not of rank-5 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(byte[][][][][][] src, ByteNdArray dst)
      Copy a 6-dimensional array of bytes into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-6 array
      Throws:
      IllegalArgumentException - if dst is not of rank-6 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(short[] src, ShortNdArray dst)
      Copy an array of shorts into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-1 array
      Throws:
      IllegalArgumentException - if dst is not of rank-1 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(short[][] src, ShortNdArray dst)
      Copy a 2-dimensional array of shorts into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-2 array
      Throws:
      IllegalArgumentException - if dst is not of rank-2 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(short[][][] src, ShortNdArray dst)
      Copy a 3-dimensional array of shorts into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-3 array
      Throws:
      IllegalArgumentException - if dst is not of rank-3 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(short[][][][] src, ShortNdArray dst)
      Copy a 4-dimensional array of shorts into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-4 array
      Throws:
      IllegalArgumentException - if dst is not of rank-4 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(short[][][][][] src, ShortNdArray dst)
      Copy a 5-dimensional array of shorts into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-5 array
      Throws:
      IllegalArgumentException - if dst is not of rank-5 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(short[][][][][][] src, ShortNdArray dst)
      Copy a 6-dimensional array of shorts into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-6 array
      Throws:
      IllegalArgumentException - if dst is not of rank-6 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(boolean[] src, BooleanNdArray dst)
      Copy an array of booleans into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-1 array
      Throws:
      IllegalArgumentException - if dst is not of rank-1 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(boolean[][] src, BooleanNdArray dst)
      Copy a 2-dimensional array of booleans into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-2 array
      Throws:
      IllegalArgumentException - if dst is not of rank-2 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(boolean[][][] src, BooleanNdArray dst)
      Copy a 3-dimensional array of booleans into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-3 array
      Throws:
      IllegalArgumentException - if dst is not of rank-3 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(boolean[][][][] src, BooleanNdArray dst)
      Copy a 4-dimensional array of booleans into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-4 array
      Throws:
      IllegalArgumentException - if dst is not of rank-4 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(boolean[][][][][] src, BooleanNdArray dst)
      Copy a 5-dimensional array of booleans into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-5 array
      Throws:
      IllegalArgumentException - if dst is not of rank-5 or has an incompatible shape with the source array
    • copyTo

      public static void copyTo(boolean[][][][][][] src, BooleanNdArray dst)
      Copy a 6-dimensional array of booleans into the dst NdArray
      Parameters:
      src - source array
      dst - destination rank-6 array
      Throws:
      IllegalArgumentException - if dst is not of rank-6 or has an incompatible shape with the source array
    • copyTo

      public static <T> void copyTo(T[] src, NdArray<T> dst)
      Copy an array of objects into the dst NdArray
      Type Parameters:
      T - data type
      Parameters:
      src - source array
      dst - destination rank-1 array
      Throws:
      IllegalArgumentException - if dst is not of rank-1 or has an incompatible shape with the source array
    • copyTo

      public static <T> void copyTo(T[][] src, NdArray<T> dst)
      Copy a 2-dimensional array of objects into the dst NdArray
      Type Parameters:
      T - data type
      Parameters:
      src - source array
      dst - destination rank-2 array
      Throws:
      IllegalArgumentException - if dst is not of rank-2 or has an incompatible shape with the source array
    • copyTo

      public static <T> void copyTo(T[][][] src, NdArray<T> dst)
      Copy a 3-dimensional array of objects into the dst NdArray
      Type Parameters:
      T - data type
      Parameters:
      src - source array
      dst - destination rank-3 array
      Throws:
      IllegalArgumentException - if dst is not of rank-3 or has an incompatible shape with the source array
    • copyTo

      public static <T> void copyTo(T[][][][] src, NdArray<T> dst)
      Copy a 4-dimensional array of objects into the dst NdArray
      Type Parameters:
      T - data type
      Parameters:
      src - source array
      dst - destination rank-4 array
      Throws:
      IllegalArgumentException - if dst is not of rank-4 or has an incompatible shape with the source array
    • copyTo

      public static <T> void copyTo(T[][][][][] src, NdArray<T> dst)
      Copy a 5-dimensional array of objects into the dst NdArray
      Type Parameters:
      T - data type
      Parameters:
      src - source array
      dst - destination rank-5 array
      Throws:
      IllegalArgumentException - if dst is not of rank-5 or has an incompatible shape with the source array
    • copyTo

      public static <T> void copyTo(T[][][][][][] src, NdArray<T> dst)
      Copy a 6-dimensional array of objects into the dst NdArray
      Type Parameters:
      T - data type
      Parameters:
      src - source array
      dst - destination rank-6 array
      Throws:
      IllegalArgumentException - if dst is not of rank-6 or has an incompatible shape with the source array
    • copyFrom

      public static void copyFrom(IntNdArray src, int[] dst)
      Copy a NdArray to an array of ints
      Parameters:
      src - source rank-1 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-1
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(IntNdArray src, int[][] dst)
      Copy a NdArray to a 2-dimensional array of ints
      Parameters:
      src - source rank-2 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-2
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(IntNdArray src, int[][][] dst)
      Copy a NdArray to a 3-dimensional array of ints
      Parameters:
      src - source rank-3 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-3
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(IntNdArray src, int[][][][] dst)
      Copy a NdArray to a 4-dimensional array of ints
      Parameters:
      src - source rank-4 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-4
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(IntNdArray src, int[][][][][] dst)
      Copy a NdArray to a 5-dimensional array of ints
      Parameters:
      src - source rank-5 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-5
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(IntNdArray src, int[][][][][][] dst)
      Copy a NdArray to a 6-dimensional array of ints
      Parameters:
      src - source rank-6 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-6
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(LongNdArray src, long[] dst)
      Copy a NdArray to an array of longs
      Parameters:
      src - source rank-1 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-1
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(LongNdArray src, long[][] dst)
      Copy a NdArray to a 2-dimensional array of longs
      Parameters:
      src - source rank-2 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-2
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(LongNdArray src, long[][][] dst)
      Copy a NdArray to a 3-dimensional array of longs
      Parameters:
      src - source rank-3 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-3
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(LongNdArray src, long[][][][] dst)
      Copy a NdArray to a 4-dimensional array of longs
      Parameters:
      src - source rank-4 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-4
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(LongNdArray src, long[][][][][] dst)
      Copy a NdArray to a 5-dimensional array of longs
      Parameters:
      src - source rank-5 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-5
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(LongNdArray src, long[][][][][][] dst)
      Copy a NdArray to a 6-dimensional array of longs
      Parameters:
      src - source rank-6 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-6
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(FloatNdArray src, float[] dst)
      Copy a NdArray to an array of floats
      Parameters:
      src - source rank-1 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-1
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(FloatNdArray src, float[][] dst)
      Copy a NdArray to a 2-dimensional array of floats
      Parameters:
      src - source rank-2 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-2
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(FloatNdArray src, float[][][] dst)
      Copy a NdArray to a 3-dimensional array of floats
      Parameters:
      src - source rank-3 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-3
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(FloatNdArray src, float[][][][] dst)
      Copy a NdArray to a 4-dimensional array of floats
      Parameters:
      src - source rank-4 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-4
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(FloatNdArray src, float[][][][][] dst)
      Copy a NdArray to a 5-dimensional array of floats
      Parameters:
      src - source rank-5 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-5
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(FloatNdArray src, float[][][][][][] dst)
      Copy a NdArray to a 6-dimensional array of floats
      Parameters:
      src - source rank-6 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-6
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(DoubleNdArray src, double[] dst)
      Copy a NdArray to an array of doubles
      Parameters:
      src - source rank-1 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-1
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(DoubleNdArray src, double[][] dst)
      Copy a NdArray to a 2-dimensional array of doubles
      Parameters:
      src - source rank-2 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-2
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(DoubleNdArray src, double[][][] dst)
      Copy a NdArray to a 3-dimensional array of doubles
      Parameters:
      src - source rank-3 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-3
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(DoubleNdArray src, double[][][][] dst)
      Copy a NdArray to a 4-dimensional array of doubles
      Parameters:
      src - source rank-4 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-4
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(DoubleNdArray src, double[][][][][] dst)
      Copy a NdArray to a 5-dimensional array of doubles
      Parameters:
      src - source rank-5 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-5
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(DoubleNdArray src, double[][][][][][] dst)
      Copy a NdArray to a 6-dimensional array of doubles
      Parameters:
      src - source rank-6 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-6
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ByteNdArray src, byte[] dst)
      Copy a NdArray to an array of bytes
      Parameters:
      src - source rank-1 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-1
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ByteNdArray src, byte[][] dst)
      Copy a NdArray to a 2-dimensional array of bytes
      Parameters:
      src - source rank-2 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-2
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ByteNdArray src, byte[][][] dst)
      Copy a NdArray to a 3-dimensional array of bytes
      Parameters:
      src - source rank-3 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-3
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ByteNdArray src, byte[][][][] dst)
      Copy a NdArray to a 4-dimensional array of bytes
      Parameters:
      src - source rank-4 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-4
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ByteNdArray src, byte[][][][][] dst)
      Copy a NdArray to a 5-dimensional array of bytes
      Parameters:
      src - source rank-5 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-5
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ByteNdArray src, byte[][][][][][] dst)
      Copy a NdArray to a 6-dimensional array of bytes
      Parameters:
      src - source rank-6 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-6
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ShortNdArray src, short[] dst)
      Copy a NdArray to an array of shorts
      Parameters:
      src - source rank-1 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-1
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ShortNdArray src, short[][] dst)
      Copy a NdArray to a 2-dimensional array of shorts
      Parameters:
      src - source rank-2 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-2
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ShortNdArray src, short[][][] dst)
      Copy a NdArray to a 3-dimensional array of shorts
      Parameters:
      src - source rank-3 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-3
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ShortNdArray src, short[][][][] dst)
      Copy a NdArray to a 4-dimensional array of shorts
      Parameters:
      src - source rank-4 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-4
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ShortNdArray src, short[][][][][] dst)
      Copy a NdArray to a 5-dimensional array of shorts
      Parameters:
      src - source rank-5 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-5
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(ShortNdArray src, short[][][][][][] dst)
      Copy a NdArray to a 6-dimensional array of shorts
      Parameters:
      src - source rank-6 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-6
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(BooleanNdArray src, boolean[] dst)
      Copy a NdArray to an array of booleans.
      Parameters:
      src - source rank-1 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-1
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(BooleanNdArray src, boolean[][] dst)
      Copy a NdArray to a 2-dimensional array of booleans
      Parameters:
      src - source rank-2 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-2
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(BooleanNdArray src, boolean[][][] dst)
      Copy a NdArray to a 3-dimensional array of booleans
      Parameters:
      src - source rank-3 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-3
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(BooleanNdArray src, boolean[][][][] dst)
      Copy a NdArray to a 4-dimensional array of booleans
      Parameters:
      src - source rank-4 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-4
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(BooleanNdArray src, boolean[][][][][] dst)
      Copy a NdArray to a 5-dimensional array of booleans
      Parameters:
      src - source rank-5 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-5
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static void copyFrom(BooleanNdArray src, boolean[][][][][][] dst)
      Copy a NdArray to a 6-dimensional array of booleans
      Parameters:
      src - source rank-6 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-6
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static <T> void copyFrom(NdArray<T> src, T[] dst)
      Copy a NdArray to an array of objects
      Type Parameters:
      T - data type
      Parameters:
      src - source rank-1 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-1
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static <T> void copyFrom(NdArray<T> src, T[][] dst)
      Copy a NdArray to a 2-dimensional array of objects
      Type Parameters:
      T - data type
      Parameters:
      src - source rank-2 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-2
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static <T> void copyFrom(NdArray<T> src, T[][][] dst)
      Copy a NdArray to a 3-dimensional array of objects
      Type Parameters:
      T - data type
      Parameters:
      src - source rank-3 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-3
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static <T> void copyFrom(NdArray<T> src, T[][][][] dst)
      Copy a NdArray to a 4-dimensional array of objects
      Type Parameters:
      T - data type
      Parameters:
      src - source rank-4 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-4
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static <T> void copyFrom(NdArray<T> src, T[][][][][] dst)
      Copy a NdArray to a 5-dimensional array of objects
      Type Parameters:
      T - data type
      Parameters:
      src - source rank-5 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-5
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • copyFrom

      public static <T> void copyFrom(NdArray<T> src, T[][][][][][] dst)
      Copy a NdArray to a 6-dimensional array of objects
      Type Parameters:
      T - data type
      Parameters:
      src - source rank-6 array
      dst - destination array
      Throws:
      IllegalArgumentException - if src is not of rank-6
      ArrayIndexOutOfBoundsException - if not all elements of src can fit it the destination array
    • shapeOf

      public static Shape shapeOf(int[] array)
      Compute the shape of an int array.
      Parameters:
      array - 1D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(int[][] array)
      Compute the shape of a 2-dimensional int array.
      Parameters:
      array - 2D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(int[][][] array)
      Compute the shape of a 3-dimensional int array.
      Parameters:
      array - 3D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(int[][][][] array)
      Compute the shape of a 4-dimensional int array.
      Parameters:
      array - 4D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(int[][][][][] array)
      Compute the shape of a 5-dimensional int array.
      Parameters:
      array - 5D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(int[][][][][][] array)
      Compute the shape of a 6-dimensional int array.
      Parameters:
      array - 6D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(long[] array)
      Compute the shape of a long array.
      Parameters:
      array - 1D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(long[][] array)
      Compute the shape of a 2-dimensional long array.
      Parameters:
      array - 2D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(long[][][] array)
      Compute the shape of a 3-dimensional long array.
      Parameters:
      array - 3D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(long[][][][] array)
      Compute the shape of a 4-dimensional long array.
      Parameters:
      array - 4D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(long[][][][][] array)
      Compute the shape of a 5-dimensional long array.
      Parameters:
      array - 5D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(long[][][][][][] array)
      Compute the shape of a 6-dimensional long array.
      Parameters:
      array - 6D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(float[] array)
      Compute the shape of a float array.
      Parameters:
      array - 1D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(float[][] array)
      Compute the shape of a 2-dimensional float array.
      Parameters:
      array - 2D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(float[][][] array)
      Compute the shape of a 3-dimensional float array.
      Parameters:
      array - 3D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(float[][][][] array)
      Compute the shape of a 4-dimensional float array.
      Parameters:
      array - 4D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(float[][][][][] array)
      Compute the shape of a 5-dimensional float array.
      Parameters:
      array - 5D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(float[][][][][][] array)
      Compute the shape of a 6-dimensional float array.
      Parameters:
      array - 6D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(double[] array)
      Compute the shape of a double array.
      Parameters:
      array - 1D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(double[][] array)
      Compute the shape of a 2-dimensional double array.
      Parameters:
      array - 2D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(double[][][] array)
      Compute the shape of a 3-dimensional double array.
      Parameters:
      array - 3D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(double[][][][] array)
      Compute the shape of a 4-dimensional double array.
      Parameters:
      array - 4D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(double[][][][][] array)
      Compute the shape of a 5-dimensional double array.
      Parameters:
      array - 5D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(double[][][][][][] array)
      Compute the shape of a 6-dimensional double array.
      Parameters:
      array - 6D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(byte[] array)
      Compute the shape of a byte array.
      Parameters:
      array - 1D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(byte[][] array)
      Compute the shape of a 2-dimensional byte array.
      Parameters:
      array - 2D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(byte[][][] array)
      Compute the shape of a 3-dimensional byte array.
      Parameters:
      array - 3D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(byte[][][][] array)
      Compute the shape of a 4-dimensional byte array.
      Parameters:
      array - 4D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(byte[][][][][] array)
      Compute the shape of a 5-dimensional byte array.
      Parameters:
      array - 5D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(byte[][][][][][] array)
      Compute the shape of a 6-dimensional byte array.
      Parameters:
      array - 6D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(short[] array)
      Compute the shape of a short array.
      Parameters:
      array - 1D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(short[][] array)
      Compute the shape of a 2-dimensional short array.
      Parameters:
      array - 2D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(short[][][] array)
      Compute the shape of a 3-dimensional short array.
      Parameters:
      array - 3D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(short[][][][] array)
      Compute the shape of a 4-dimensional short array.
      Parameters:
      array - 4D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(short[][][][][] array)
      Compute the shape of a 5-dimensional short array.
      Parameters:
      array - 5D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(short[][][][][][] array)
      Compute the shape of a 6-dimensional short array.
      Parameters:
      array - 6D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(boolean[] array)
      Compute the shape of a boolean array.
      Parameters:
      array - 1D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(boolean[][] array)
      Compute the shape of a 2-dimensional boolean array.
      Parameters:
      array - 2D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(boolean[][][] array)
      Compute the shape of a 3-dimensional boolean array.
      Parameters:
      array - 3D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(boolean[][][][] array)
      Compute the shape of a 4-dimensional boolean array.
      Parameters:
      array - 4D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(boolean[][][][][] array)
      Compute the shape of a 5-dimensional boolean array.
      Parameters:
      array - 5D array
      Returns:
      shape of the array
    • shapeOf

      public static Shape shapeOf(boolean[][][][][][] array)
      Compute the shape of a 6-dimensional boolean array.
      Parameters:
      array - 6D array
      Returns:
      shape of the array
    • shapeOf

      public static <T> Shape shapeOf(T[] array)
      Compute the shape of an object array.
      Type Parameters:
      T - data type
      Parameters:
      array - 1D array
      Returns:
      shape of the array
    • shapeOf

      public static <T> Shape shapeOf(T[][] array)
      Compute the shape of a 2-dimensional object array.
      Type Parameters:
      T - data type
      Parameters:
      array - 2D array
      Returns:
      shape of the array
    • shapeOf

      public static <T> Shape shapeOf(T[][][] array)
      Compute the shape of a 3-dimensional object array.
      Type Parameters:
      T - data type
      Parameters:
      array - 3D array
      Returns:
      shape of the array
    • shapeOf

      public static <T> Shape shapeOf(T[][][][] array)
      Compute the shape of a 4-dimensional object array.
      Type Parameters:
      T - data type
      Parameters:
      array - 4D array
      Returns:
      shape of the array
    • shapeOf

      public static <T> Shape shapeOf(T[][][][][] array)
      Compute the shape of a 5-dimensional object array.
      Type Parameters:
      T - data type
      Parameters:
      array - 5D array
      Returns:
      shape of the array
    • shapeOf

      public static <T> Shape shapeOf(T[][][][][][] array)
      Compute the shape of a 6-dimensional object array.
      Type Parameters:
      T - data type
      Parameters:
      array - 6D array
      Returns:
      shape of the array