RandomTruncatedNormal¶
Draw an array of random numbers from a truncated normal distribution with a given mean and standard deviation, optionally matching a template array in shape and optionally data type.
If deterministic results are sought, pass in a seed; see also CreateRandomSeed for documentation on how seeds are best managed. The node supports alternative compute backends, which can be used to speed up processing, Version 0.8.0
Ports/Properties¶
array¶
Output array.
- verbose name: Array
- default value: None
- port type: DataPort
- value type: AnyArray (can be None)
- data direction: OUT
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
shape¶
Shape of the array. Can be omitted if a template array is provided.
- verbose name: Shape
- default value: []
- port type: ListPort
- value type: list (can be None)
mean¶
Mean of the distribution.
- verbose name: Mean
- default value: 0
- port type: FloatPort
- value type: float (can be None)
std¶
Standard deviation of the distribution.
- verbose name: Std
- default value: 1
- port type: FloatPort
- value type: float (can be None)
lower¶
Lower bound in standard deviations.
- verbose name: Lower
- default value: -2
- port type: FloatPort
- value type: float (can be None)
upper¶
Upper bound in standard deviations.
- verbose name: Upper
- default value: 2
- port type: FloatPort
- value type: float (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 and otherwise numpy unless overridden. Numpy is the standard CPU backend that underpins most of NeuroPype's operations. The others require one or more GPUs to be present on the system, except for torch-cpu. 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 to the current default (usually 64-bit). Can be reduced to save memory (e.g. if running on GPU).
- 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)