SetXor¶
Calculate the symmetric difference (xor) of two or more sets.
That is, the result will have all items that are in exactly one of the input sets. Note that the output will have no duplicates. This node will treat sets, lists, tuples, and arrays as sets, and all other values (incl. strings, bytes, numbers, bools and dicts) as one-element sets containg the value. Note that this will not flatten lists of lists but will instead treat each inner list as a set element. n-dimensional arrays are not permitted and have to be either flattened to a 1d array, or converted into a list of array slices, whichever is desired. A subtle point is that set operations in NeuroPype allow individual input sets to have duplicates and will deduplicate each set beforehand. This means that an element that occurs twice or more in one of the sets but not in any of the other sets will be considered as being in exactly one of the sets and will thus appear in the output - as one should expect on a set- theoretic basis. If at least one of the operands was an array, the result is an array, otherwise a list. One may also pass either operand as Python's built-in set type, in which case the result will be a set, unless the result contains set elements that are themselves composite objects (e.g., lists or dicts), in which case the output remains a list. As with all set operations, the order of items in the result is not guaranteed to be the same as in the inputs and may also not be sorted. If sorted outputs are desired, one may use the Sort node on the result. More Info... Version 0.8.0
Ports/Properties¶
data1¶
Set 1.
data2¶
Set 2.
data3¶
Set 3.
data4¶
Set 4.
data5¶
Set 5.
data6¶
Set 6.
data7¶
Set 7.
data8¶
Set 8.
data9¶
Set 9.
data10¶
Set 10.
dataN¶
Additional sets.
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.
result¶
Result.