nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/ops/transforms/Transforms.java
private static INDArray exec(ScalarOp op) {
        if (op.x().isCleanedUp())
            throw new IllegalStateException("NDArray already freed");
        return Nd4j.getExecutioner().exec(op).z();
    }
private static INDArray exec(ScalarOp op) {
        if (op.x().isCleanedUp())
            throw new IllegalStateException("NDArray already freed");
        return Nd4j.getExecutioner().exec(op).z();
    }
private static INDArray exec ( ScalarOp op ) { if ( op . x ( ) . isCleanedUp ( ) ) throw new IllegalStateException ( "NDArray already freed" ) ; return Nd4j . getExecutioner ( ) . exec ( op ) . z ( ) ; }
Apply the given elementwise op

@param op the factory to create the op
@return the new ndarray
Apply the given elementwise op