evaluate_attr_predicate
evaluate_attr_predicate(
values ,
name: str ,
value ,
units = None,
)-> ‘np.ndarray’
Evaluate one attr selector against values held in memory.
The in-memory twin of build_attr_clause, for values which never reach the index — those an inventory states rather than a file. It takes the same selector shapes and means the same thing by each, so a selector cannot mean one thing for a patch which states the attr and another for a patch the inventory answers for.
Parameters
| Parameter | Description |
|---|---|
| values | The value each row holds; every one of them states something. |
| name | The attr the selector names, for error messages. |
| value |
The selector, in any shape build_attr_clause accepts.
|
| units |
The canonical units the index stores each kind of this attr in, for converting a unit-bearing selector exactly as the index side would. A kind the index knows nothing about is unitless, and a selector carrying units against one is the error it is there. |
Returns
A boolean array of the same length as values.