Skip to content

← formatting package

CreateBlock

A block is a multi-dimensional array with named/typed axes.

These correspond to the data and axes fields of the block (e.g., when using Set/Get Nested). In NeuroPype, each axis is of one of several types, such as space, time, frequency, instance, etc, and depending on the type, the axis may have specific fields, such as the array of time points or frequencies, or channel names in a space axis that characterize the dimensions of the array. The only constraint is that the number of axes matches the number of dimensions of the array, and that the n'th axis has the same length (number of elements) as the n'th dimension of the array. The node can optionally emit None if the resulting block is empty. Version 1.0.0

Ports/Properties

block

Output block.

verbose name
Block
default value
None
port type
DataPort
value type
Block (can be None)
data direction
OUT

array

Input array.

verbose name
Array
default value
None
port type
DataPort
value type
AnyArray (can be None)
data direction
IN

axis1

Axis 1.

verbose name
Axis1
default value
None
port type
DataPort
value type
BaseAxis (can be None)
data direction
IN

axis2

Axis 2.

verbose name
Axis2
default value
None
port type
DataPort
value type
BaseAxis (can be None)
data direction
IN

axis3

Axis 3.

verbose name
Axis3
default value
None
port type
DataPort
value type
BaseAxis (can be None)
data direction
IN

axis4

Axis 4.

verbose name
Axis4
default value
None
port type
DataPort
value type
BaseAxis (can be None)
data direction
IN

axisN

Additional axes.. ..

verbose name
Axisn
default value
None
port type
DataPort
value type
list (can be None)
data direction
IN

axes

Axis list.

verbose name
Axes
default value
None
port type
AliasPort
value type
list (can be None)

axis_compatibility

How to handle shape mismatches between the array and the axes. If set to strict, then the dimensions of the array must match the lengths of the axes exactly. If set to 'allow extra singletons', then both the array may have extra singleton (length-1) dimensions or the axes may have extra length-1 axes. If set to 'allow shape mismatch', then the array and axes may have different shapes, as long as the number of elements in the array matches the product of the lengths of the axes. Note that this latter case is potentially dangerous in that the data may get shuffled in unexpected ways depending on the memory layout of the data (C or FORTRAN), but if the user knows what they're doing, it can be useful for reshaping data.

verbose name
Axis Compatibility
default value
strict
port type
EnumPort
value type
str (can be None)

none_if_empty

Return None if the resulting block is empty.

verbose name
None If Empty
default value
False
port type
BoolPort
value type
bool (can be None)

verbose

Enable verbose diagnostics output.

verbose name
Verbose
default value
False
port type
BoolPort
value type
bool (can be None)

axis0

Axis 0.

verbose name
Axis0
default value
None
port type
DataPort
value type
BaseAxis (can be None)
data direction
IN

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)