@Override
    public boolean isValueCompatible(FieldValue value) {
        if (value == null) return false;
        if (tensorType == null) return true; // any
        if ( ! TensorFieldValue.class.isAssignableFrom(value.getClass())) return false;
        TensorFieldValue tensorValue = (TensorFieldValue)value;
        return tensorValue.getDataType().getTensorType().isConvertibleTo(tensorType);
    }
A DataType containing a tensor type

@author bratseth
document/src/main/java/com/yahoo/document/TensorDataType.java