observe()¶
- auglib.observe.observe(x)[source]¶
Convenient function to observe a value.
Returns
x()ifxis of typeauglib.observe.Base, otherwise justx.- Parameters
x (
typing.Union[typing.Any,auglib.core.observe.Base]) – (observable) object- Return type
- Returns
observed value
Examples
>>> import auglib >>> auglib.seed(1) >>> observe(99) 99 >>> o = IntUni(low=0, high=5) >>> observe(o) 5 >>> observe(o) 3