concat function

VARP concat(
  1. List<VARP> values,
  2. int axis
)

Concatenates variables along one dimension.

Args:

  • values: A list of variables a single variable.
  • axis: A int. Dimension along which to concatenate. Must be in the range [-rank(values), rank(values)). As in Python, indexing for axis is 0-based. Positive axis in the rage of [0, rank(values)) refers to axis-th dimension. And negative axis refers to axis + rank(values)-th dimension.

Returns:

  • A variable resulting from concatenation of the input variables.

Implementation

VARP concat(List<VARP> values, int axis) {
  final pVec = values.toNativeVec();
  final rval = VARP.fromPointer(C.mnn_expr_Concat(pVec.ptr, axis));
  pVec.dispose();
  return rval;
}