pg.is_pure_symbolic¶
Accessible via pg.is_pure_symbolic
, pg.symbolic.is_pure_symbolic
.
- is_pure_symbolic(x)[source]¶
Returns if the input value is pure symbolic.
Example:
class Bar(pg.PureSymbolic): pass @pg.symbolize def foo(x, y): pass assert not pg.is_pure_symbolic(1) assert not pg.is_pure_symbolic(foo(1, 2)) assert pg.is_pure_symbolic(Bar()) assert pg.is_pure_symbolic(foo(Bar(), 1)) assert pg.is_pure_symbolic(foo(pg.oneof([1, 2]), 1))
- Return type:
- Parameters:
x – Value to query against.
- Returns:
True if value itself is PureSymbolic or its child and nested child fields contain PureSymbolic values.