@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; }
@SuppressWarnings("unchecked") public static <T extends INDArray> SliceArray<T> create(INDArray a) { return new SliceArray<T>(a.getShape(), (T[]) a.toSliceArray()); }