public static AllocationShape buildAllocationShape(INDArray array) {
        AllocationShape shape = new AllocationShape();
        shape.setStride(array.elementWiseStride());
        shape.setOffset(array.originalOffset());
        shape.setDataType(array.data().dataType());
        shape.setLength(array.length());
        shape.setDataType(array.data().dataType());

        return shape;
    }
public static AllocationShape buildAllocationShape(INDArray array) {
        AllocationShape shape = new AllocationShape();
        shape.setStride(array.elementWiseStride());
        shape.setOffset(array.originalOffset());
        shape.setDataType(array.data().dataType());
        shape.setLength(array.length());
        shape.setDataType(array.data().dataType());

        return shape;
    }
public static AllocationShape buildAllocationShape ( INDArray array ) { AllocationShape shape = new AllocationShape ( ) ; shape . setStride ( array . elementWiseStride ( ) ) ; shape . setOffset ( array . originalOffset ( ) ) ; shape . setDataType ( array . data ( ) . dataType ( ) ) ; shape . setLength ( array . length ( ) ) ; shape . setDataType ( array . data ( ) . dataType ( ) ) ; return shape ; }
This method returns AllocationShape for specific array, that takes in account its real shape: offset, length, etc

@param array
@return
This method returns AllocationShape for specific array that takes in account its real shape : offset length etc