Skip to content

SCALAR

Download Flojoy Studio to try this app
Return a single Scalar value. Params: value : float The value set in Parameters Returns: out : Scalar c: return the value being set in Parameters
Python Code
from flojoy import flojoy, Scalar, DataContainer
from typing import Optional


@flojoy
def SCALAR(
    _: Optional[DataContainer] = None,
    value: float = 3.0,
) -> Scalar:
    """Return a single Scalar value.

    Parameters
    ----------
    value : float
        The value set in Parameters

    Returns
    -------
    Scalar
        c: return the value being set in Parameters
    """

    return Scalar(c=value)

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

In this example, LINSPACE is used to generate a list of 200 samples and is added with a SCALAR that holds value 10

All of the points that were generated have increased by 10.