2022-03-01 13:04:09 +01:00

1.2 KiB

layout
default

Function flatten #

Flatten a multi dimensional matrix into a single dimensional matrix. It is guaranteed to always return a clone of the argument.

Syntax #

math.flatten(x)

Parameters #

Parameter Type Description
x Matrix | Array Matrix to be flattened

Returns #

Type Description
Matrix | Array Returns the flattened matrix

Throws #

Type Description

Examples #

math.flatten([[1,2], [3,4]])   // returns [1, 2, 3, 4]

See also #

concat, resize, size, squeeze