REVERSE_VECTOR
The REVERSE_VECTOR node returns the input vector wherethe elements are in the reverse order
Inputs
------
default : Vector
The input vectorParams: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 the input vector where
the elements are in the reverse order
Inputs
------
default : Vector
The input vector
Returns
-------
Vector
Reversed input vector
"""
return Vector(v=flip(default.v))
Example
Having problem 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