byRow#

swordfish.function.byRow()#

If func is a unary function, apply the specified function to each row of X; if func is a binary function, apply func(Xi, Yi) to each row of X and Y.

Parameters:
  • func (Constant) – Either a vector function (both input and output are vectors of equal length) or an aggregate function.

  • X (Constant) – A matrix/table/tuple/array vector/columnar tuple.

  • Y (Constant, optional) – A matrix/table/tuple/array vector/columnar tuple, by default DFLT

Returns:

If func is an aggregate function, byRow returns a vector of the same size as the number of rows in X/Y. If func is a vector function, byRow returns a result with the same form and dimension as X/Y.

Return type:

Constant