Sum¶
Compute the sum along a given axis.
The chosen axis will be removed from the data and replaced by a new one-element feature axis. In the special case that the sum is taken over time, a dummy time axis will be retained, unless this behavior is overriden using the force feature axis parameter. Version 1.1.0
Ports/Properties¶
data¶
Data to process.
axis¶
Axis along which to take the statistic. This axis will drop out of the data and, if keep_axis is set, is replaced by a dummy one-element axis (usually of same type as before, although special cases apply for specific reduction nodes). One may also list a comma-separated list of axes here to reduce over multiple axes at a time. If this is left blank or set to None, then all axes will be reduced over; this can be used to obtain a single value if keep_axis is also set to False. The tree axis is a special case that will reduce over the data structure itself (e.g., dictionary), and the streams axis will reduce over the streams in a packet.
axis_occurrence¶
Index of the occurrence of the axis of desired type. (0 is the first axis of the desired type, 1 is the second, -1 is the last, -2 is the second-to-last, and so on).
keep_axis¶
Keep the axis that was reduced as a singleton (one-element) axis in the data. In script usage this can also be set to None to reduce over and drop all axes and return a scalar value (in graph pipelines the same can be achieved by setting the axis to (all axes) and keep_axis to False).
kept_axis¶
New type of the axis that was reduced over, if the keep_axis (keep reduced axis) option is enabled. Setting this to the type of an axis (e.g., feature) will result in a one-element axis of that type in place of the original axis; the value 'same' will yield an axis of the same type as the original axis (and will also preserve the old axis' custom label, if any). The 'legacy' setting will preserve the type of some axes but generate a feature axes for others, and this is not consistent between e.g., Mean, Variance and other statistics (see the "force feature axis" option for full details). The default value will change from 'legacy' to 'same' in a future release. The 'legacy (warn)' setting is like 'legacy' but will additionally issue an actionable one-time warning in which way the node's behavior will transition to a more consitent mode, and how to preserve the current behavior. One may also specify other axis types here. Note that, while one may bake a desired axis label into the axis type here, it is considered bad practice to use the label to annotate the statistic used, especially if the axis should pair correctly with other axes of same type (but perhaps different label) in downstream operations. Use a feature, statistic, or named axis for this purpose, which will record the statistic in the (one-element) axis array instead.
force_feature_axis¶
Deprecated option used in legacy pipelines. This field should be cleared in modern uses, in which case the kept_axis field takes precedence. Setting this to 'True' will always create a feature axis; setting it to 'False' will preserve the same axis type IF the legacy behavior of the node supported it, and otherwise creates a feature axis. Cases in which a feature axis was created if set to False are as follows: Variance, StandardDeviation, and CurveLength: space, frequency, instance, named, statistic, and axis were reduced to feature. Sum, MedianAbsoluteDeviation, Product, RootMeanSquare: space, named, statistic, and axis were reduced to feature. Mean: lag, named, statistic, and axis were reduced to feature. All, Any, Centroid, Largest, Smallest, Median: lag was reduced to feature.
ignore_nans¶
If activated the channels containing nan values are ignored.
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.
recurse_lists¶
Whether to treat lists as a recursive data structure as opposed to a numeric array. When disabled, lists are treated like arrays; they are expected to contain numbers or regularly shaped sublists of numbers and are subject to the conventional broadcasting rules of arrays known from numpy and similar libraries. When this option is enabled, lists may instead contain non-numeric data structures such as packets, dictionaries, tuples, or lists of non-uniform shapes, and will in turn not be subject to normal array broadcasting rules. Processing lists of numbers this way involves more overhead than when this option is set to False. Note that dictionaries and tuples are always treated as recursive data structures by this node.