Skip to content

← tensor_math package

StripSingletonAxis

Strip the given singleton axis from the data.

This node processes data where the extent along a given is one element. The node will then remove the axis from the data. The node can be used where data has an unnecessary axis of some type after an operation, and it needs to be removed for a successive operation to work as expected. This is often helpful since nodes in NeuroPype may expect a certain number (and types) of axes only. See also SqueezeAxes to strip all singleton axes. Version 1.0.1

Ports/Properties

data

Data to process.

verbose name
Data
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
INOUT

axis

Axis to remove. Select the axis type or specify a specific axis that has a label, using axis.mylabel syntax.

verbose name
Axis
default value
time
port type
ComboPort
value type
str (can be None)

skip_non_singletons

If True, do not attempt to strip target axis if target axis is present but contains more than 1 element, and pass through output unchanged. If False, the node will raise an error if the target axis has more than 1 element.

verbose name
Skip If Not Singleton
default value
False
port type
BoolPort
value type
bool (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)