Skip to content

REMOVE_DUPLICATES_VECTOR

Download Flojoy Studio to try this app
The REMOVE_DUPLICATES_VECTOR node returns a vector with only unique elements. Params: default : Vector The input vector Returns: out : Vector Unique input vector
Python Code
from numpy import unique
from flojoy import flojoy, Vector


@flojoy
def REMOVE_DUPLICATES_VECTOR(
    default: Vector,
) -> Vector:
    """The REMOVE_DUPLICATES_VECTOR node returns a vector with only unique elements.

    Parameters
    ----------
    default : Vector
        The input vector

    Returns
    -------
    Vector
        Unique input vector
    """

    return Vector(v=unique(default.v))

Find this Flojoy Block on GitHub

Example App

Having problems with this example app? Join our Discord community and we will help you out!
React Flow mini map

This example shows the function of the REMOVE_DUPLICATES node. It removes duplicates from a Vector. In the example, a Vector is created with two equal values. REMOVE_DUPLICATES removes one of these values.