private static Value asValue(Tensor tensor) {
        if (tensor.type().rank() == 0)
            return DoubleValue.of(tensor.asDouble());
        else
            return TensorValue.of(tensor);
    }
Extends the transform context with rank profile information

@author bratseth
config-model/src/main/java/com/yahoo/schema/expressiontransforms/RankProfileTransformContext.java