CreateSlice¶
This node is deprecated use Create Selection Interval instead.
Define a selection interval (slice) that can be used to select items from a collection, e.g., using SelectRange. Slices consist of a start index, a stop index, and a step size, and the end value is by convention not included in the range unless the inclusive option is set to True. Note that, when the endpoints are data values along a real-valued domain (i.e., when they represent "coordinate" values along a continuous axis such as time or frequency), it is necessary to specify the domain explicitly as 'float' for the inclusive option to work as expected correctly. Both the start and end value are optional, and if not given, range from/to the respective end of the data. When specifying integer-valued slices, note that slices use 0-based indexing, and negative integers count from the end of the collection that they are used with, where -1 is the last element, -2 the second-to-last etc. Also, negative steps run in reverse. Alterantively, one may also provide a start index and a length (leaving the other parameters at their default); then, stop is derived as start+length and the inclusive option does not apply. Note that, for real-valued endpoints, negative values do NOT count from the "end" of the range; these are merely treated as negative values along the domain. Version 1.0.1
Ports/Properties¶
selection¶
Selection range.
start¶
Start value of the range.
stop¶
End value of the range. Not included in the range unless the inclusive option is set to True.
step¶
Step size of the range, in terms of generated indices (defaults to 1). If set to a negative value, the range runs in reverse, and if set to, e.g., 2, will yield every other element.
length¶
Alternative way to specify the range in terms of the number of elements to retain, beginning with the start value.
inclusive¶
Whether the stop value is inclusive or exclusive. The start value is always inclusive. Remember to set the domain to a value other than unspecified to avoid warnings.
domain¶
The domain of the interval endpoints. This is necessary for the inclusive option to work correctly.
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.