Formula¶
Evaluate a mathematical formula of n variables.
This node can take in zero or more numeric inputs of mixed types (int, float, array, list, packet, etc.), which are given the variable names 0 to N, and will evaluate the specified mathematical formula using these variables. Standard mathematical operators, functions, and constants are available and resolve to the respective nodes from the elementwise category. Note that, while the syntax is that of Python, the computation represented by the formula is evaluated by the nodes from the elementwise category, and therefore allows mixing numbers, arrays lists, packets and so forth. The result will then be of the highest type of the inputs (Packet, array, list, float, int). Version 0.8.0
Ports/Properties¶
result¶
Result.
name1¶
Variable name 1.
var1¶
Variable value 1.
name2¶
Variable name 2.
var2¶
Variable value 2.
name3¶
Variable name 3.
var3¶
Variable value 3.
name4¶
Variable name 4.
var4¶
Variable value 4.
name5¶
Variable name 5.
var5¶
Variable value 5.
name6¶
Variable name 6.
var6¶
Variable value 6.
name7¶
Variable name 7.
var7¶
Variable value 7.
name8¶
Variable name 8.
var8¶
Variable value 8.
name9¶
Variable name 9.
var9¶
Variable value 9.
nameN¶
Additional variable names.. .
varN¶
Additional variable values.. .
argdict¶
Additional variable dictionary
formula¶
The formula to evaluate. The formula can be entered in a notation known from graphing calculators, but follows the syntax of Python expressions (one notable difference is that exponentiation is written as e ** x instead of e^x). The formula can use variables named according to the user-provided listing, and will then reference the wired-in values. The output of the node is then the numeric value of that formula. Most of the operations in the elementwise category are available under their conventional names -- for example, "sqrt(x)2 + y + pi" is allowed. If inputs are arrays, the operation is applied to each element of the inputs and yields an array as the result. When mixing comparison operators and elementwise logical operators (i.e., & | ^), note that the logical operations have higher* precedence, so you will want to use braces when mixing these, as in (A>B)&(C<D).
desc¶
Description of the formula's output.
handle_missing¶
How to handle missing values in the input data, such as when the previous node returns None (because no data is yet available). If 'error', the node will raise an error if any of the input values are missing. If 'ignore', the node return None if all incoming values are missing.
name0¶
Variable name 0.
var0¶
Variable value 0.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.