예제 #1
0
 @Override
 public boolean equals(INDArray a) {
   if (!Arrays.equals(a.getShape(), this.getShape())) return false;
   for (int i = 0; i < slices.length; i++) {
     if (!slices[i].equals(a.slice(i))) return false;
   }
   return true;
 }
예제 #2
0
 @SuppressWarnings("unchecked")
 public static <T extends INDArray> SliceArray<T> create(INDArray a) {
   return new SliceArray<T>(a.getShape(), (T[]) a.toSliceArray());
 }