ironflow.nodes.array module

class ironflow.nodes.array.IntRand_Node(params)[source]

Bases: DataNode

Generate a random non-negative integer.

Inputs:

high (int): Biggest possible integer. (Default is 1). length (int): How many random numbers to generate. (Default is 1.)

Outputs:

randint (int|numpy.ndarray): The randomly generated value(s).

color = '#aabb44'
init_inputs: List[NodeInputBP] = [<ironflow.model.port.NodeInputBP object>, <ironflow.model.port.NodeInputBP object>, <ironflow.model.port.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ironflow.model.port.NodeOutputBP object>]
inputs: List[NodeInput]
node_function(low, high, length, *args, **kwargs) dict[source]

Takes all data input as kwargs, must return a dict with one entry for each data output

outputs: List[NodeOutput]
title = 'IntRandom'
class ironflow.nodes.array.Linspace_Node(params)[source]

Bases: DataNode

Generate a linear mesh in a given range using np.linspace.

Inputs:

min (int): The lower bound (inclusive). (Default is 1.) max (int): The upper bound (inclusive). (Default is 2.) steps (int): How many samples to take inside (min, max). (Default is 10.)

Outputs:

linspace (numpy.ndarray): A uniform sampling over the requested range.

color = '#aabb44'
init_inputs: List[NodeInputBP] = [<ironflow.model.port.NodeInputBP object>, <ironflow.model.port.NodeInputBP object>, <ironflow.model.port.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ironflow.model.port.NodeOutputBP object>]
inputs: List[NodeInput]
node_function(min, max, steps, **kwargs) dict[source]

Takes all data input as kwargs, must return a dict with one entry for each data output

outputs: List[NodeOutput]
title = 'Linspace'
class ironflow.nodes.array.Select_Node(params)[source]

Bases: DataNode

Select a single elemnt of an iterable input.

color = '#aabb44'
init_inputs: List[NodeInputBP] = [<ironflow.model.port.NodeInputBP object>, <ironflow.model.port.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ironflow.model.port.NodeOutputBP object>]
inputs: List[NodeInput]
node_function(array, i, **kwargs) dict[source]

Takes all data input as kwargs, must return a dict with one entry for each data output

outputs: List[NodeOutput]
title = 'Select'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

class ironflow.nodes.array.Slice_Node(params)[source]

Bases: DataNode

Slice a numpy array, list, or tuple, and return it as a numpy array.

When both i and j are None: Return the input whole. When i is not None and j is: Return the slice [i:] When i is None and j isn’t: Return the slice [:j] When neither are None: Return the slice [i:j]

color = '#aabb44'
init_inputs: List[NodeInputBP] = [<ironflow.model.port.NodeInputBP object>, <ironflow.model.port.NodeInputBP object>, <ironflow.model.port.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ironflow.model.port.NodeOutputBP object>]
inputs: List[NodeInput]
node_function(array, i, j, **kwargs) dict[source]

Takes all data input as kwargs, must return a dict with one entry for each data output

outputs: List[NodeOutput]
title = 'Slice'
update_event(inp=-1)[source]

Gets called when an input received a signal or some node requested data of an output in exec mode

class ironflow.nodes.array.Transpose_Node(params)[source]

Bases: DataNode

Interprets list-like input as a numpy array and transposes it.

color = '#aabb44'
init_inputs: List[NodeInputBP] = [<ironflow.model.port.NodeInputBP object>]
init_outputs: List[NodeOutputBP] = [<ironflow.model.port.NodeOutputBP object>]
inputs: List[NodeInput]
node_function(array, **kwargs) dict[source]

Takes all data input as kwargs, must return a dict with one entry for each data output

outputs: List[NodeOutput]
title = 'Transpose'