Skip to content

← deprecated package

ElementwiseExpression

Apply a math expression to each element in the data.

This node is deprecated; please use the Formula node instead. The given expression is a string in Python syntax (similar to the syntax in a graphing calculator), where the variable x to refers to the incoming data. The result of this expression is the output data. The regular mathematical functions are available -- for example, "sqrt(x)*2 + x" is allowed. This node is not available in cloud pipelines. Since this operation applies element-wise, the shape of the data array is unchanged. An advanced feature for power users is the support of special one-letter symbols that stand for special vectors that index the axes of the data array. For instance, t is the vector of time points if a time axis is present, f is the vector of frequency values of the frequency axis, i, j, and k are zero-based indices for the instance, feature, and generic axis, respectively, and u, v, w are the three coordinates of the space axis. Note that these variables are only usable when the data has the respective axes. Also, since these are row vectors while the data is an n-dimensional array, it may be necessary to use numpy reshape/transpose operations to yield the desired result (all numpy functions are available, without the need to use the "np." prefix). This node is not currently available on cloud. Version 1.1.0

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: AnyNumeric (can be None)
  • data direction: INOUT

expression

Expression to apply. The data is referred to as x. Example: sqrt(x)*2 + x. WARNING: This node is unsafe for use with untrusted strings, i.e., as received from the web.

  • verbose name: Expression
  • default value: x
  • port type: StringPort
  • value type: str (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)