@ Override public INDArray compress ( double [ ] data , int [ ] shape , char order ) { DoublePointer pointer = new DoublePointer ( data ) ; DataBuffer shapeInfo = Nd4j . getShapeInfoProvider ( ) . createShapeInformation ( shape , order ) . getFirst ( ) ; DataBuffer buffer = compressPointer ( DataBuffer . TypeEx . DOUBLE , pointer , data . length , 8 ) ; return Nd4j . createArrayFromShapeBuffer ( buffer , shapeInfo ) ; }
This method creates compressed INDArray from Java double array skipping usual INDArray instantiation routines