public INDArray compress(INDArray array, String algorithm) {
        algorithm = algorithm.toUpperCase();
        if (!codecs.containsKey(algorithm))
            throw new RuntimeException("Non-existent compression algorithm requested: [" + algorithm + "]");

        return codecs.get(algorithm).compress(array);
    }
public INDArray compress ( INDArray array , String algorithm ) { algorithm = algorithm . toUpperCase ( ) ; if ( ! codecs . containsKey ( algorithm ) ) throw new RuntimeException ( "Non-existent compression algorithm requested: [" + algorithm + "]" ) ; return codecs . get ( algorithm ) . compress ( array ) ; }
Returns a compressed version of the
given ndarray
@param array the array to compress
@param algorithm the algorithm to compress with
@return a compressed copy of this ndarray