RandomNumbers¶
Draw an array of random numbers from a passed-in distribution, optionally matching a template array in shape and optionally data type.
A random seed must be passed in, see also CreateRandomSeed for documentation on how seeds are best managed. The node supports alternative compute backends, which can be used to force the result onto a specific backend (while the actual sampling is provided by the distribution's backend, which may or may not be the same). Version 0.8.0
Ports/Properties¶
dist¶
Distribution to use.
- verbose name: Dist
- default value: None
- port type: DataPort
- value type: Distribution (can be None)
- data direction: IN
like¶
Optional template array.
- verbose name: Like
- default value: None
- port type: DataPort
- value type: AnyArray (can be None)
- data direction: IN
seed¶
Random seed for deterministic results.
- verbose name: Seed
- default value: None
- port type: DataPort
- value type: AnyArray (can be None)
- data direction: IN
data¶
Output data.
- verbose name: Data
- default value: None
- port type: DataPort
- value type: AnyNumeric (can be None)
- data direction: OUT
shape¶
Shape of the array. Can be set to None if a template array is provided via the like input.
- verbose name: Shape
- default value: []
- port type: ListPort
- value type: list (can be None)
backend¶
Optional compute backend to use. Keep is the current default, which resolves to that of the template array if one is provided as the like= argument, otherwise the compute backend of the distribution. For best performance, keep all arrays that interact with each other (via processing nodes) on the same backend.
- verbose name: Backend
- default value: keep
- port type: EnumPort
- value type: str (can be None)
precision¶
Numeric precision to use. Keep resolves to the precision of the template array if one is provided, and otherwise the precision that the distribution is configured with.
- verbose name: Precision
- default value: keep
- port type: EnumPort
- value type: str (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)