REVERSE_VECTOR
Download Flojoy Studio to try this app
The REVERSE_VECTOR node returns a vector equal to the input vector but reversed. Params: default : Vector The input vector. Returns: out : Vector Reversed 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 App
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