validate_filter#
- scikitplot.corpus.validate_filter(expression)[source]#
Return
expressionchecked and frozen to the JSON-able form.- Parameters:
- expressionFilter or mapping
A filter expression, or its JSON form.
- Returns:
- Filter
A new tree of the nine built-in operators holding only JSON scalars and naming only filterable fields:
filter_from_dict(filter_to_dict( expression)). Nothing reachable from it can be mutated afterwards.
- Raises:
- TypeError
If
expressionis neither aFilternor a mapping, or holds a node that is not one of the nine operators.- ValueError
As
filter_from_dictandfilter_to_dict.
- Parameters:
expression (Any)
- Return type: