VECTOR_2_ORDERED_PAIR
The VECTOR_2_ORDERED_PAIR node returns the OrderedPair where x and y axes are the input nodes.Params:default : VectorThe input vector that will be the x axis of OrderedPair.y : VectorThe input vector that will be the y axis of OrderedPair.Returns:out : OrderedPairThe OrderedPair that is generated from the input vectors
Python Code
from flojoy import flojoy, Vector, OrderedPair
@flojoy
def VECTOR_2_ORDERED_PAIR(default: Vector, y: Vector) -> OrderedPair:
"""The VECTOR_2_ORDERED_PAIR node returns the OrderedPair where x and y axes are the input nodes.
Parameters
----------
default : Vector
The input vector that will be the x axis of OrderedPair.
y : Vector
The input vector that will be the y axis of OrderedPair.
Returns
-------
OrderedPair
The OrderedPair that is generated from the input vectors
"""
return OrderedPair(x=default.v, y=y.v)
Example
Having problem with this example app? Join our Discord community and we will help you out!
In this example, we generate two Vector nodes using Linspace
node.
Using VECTOR_2_ORDERED_PAIR
, let one of the Vector nodes to be x axis and the other to be y axis.
Visualize the OrderedPair type output using Scatter
node