REVERSE_VECTOR
The REVERSE_VECTOR node returns a vector equal to the input vector but reversed.Params:default : VectorThe input vector.Returns:out : VectorReversed input vector.
Python Code
from numpy import flip
from flojoy import flojoy, Vector
@flojoy
def REVERSE_VECTOR(
    default: Vector,
) -> Vector:
    """The REVERSE_VECTOR node returns a vector equal to the input vector but reversed.
    Parameters
    ----------
    default : Vector
        The input vector.
    Returns
    -------
    Vector
        Reversed input vector.
    """
    return Vector(v=flip(default.v))
Example
Having problems with this example app? Join our Discord community and we will help you out!
In this example, we generate a vector type data using LINESPACE node.
Using REVERSE_VECTOR node, we reverse the elements of the data and visualize it using LINE node