private static TensorAddress asAddress(String label, TensorType type) {
        if (type.dimensions().size() != 1)
            throw new IllegalArgumentException("Expected a tensor with a single dimension but got '" + type + "'");
        return new TensorAddress.Builder(type).add(type.dimensions().get(0).name(), label).build();
    }
Reads values for a tensor subspace block

@param buffer the buffer containing the values
@param size the expected number of values
@param address the address for the block for error reporting, or null if not known
@param type the type of the tensor we are reading
@return the values read
document/src/main/java/com/yahoo/document/json/readers/TensorReader.java