klyn.math.NDArray.toList
method
public toList() as ArrayList<T>:
Description

Copies the array contents into a row-major ArrayList<T>.

Returns

A mutable list containing every element in flat order.

Example
import klyn.math

a = NDArray<Int>.fromList([[1, 2], [3, 4]])
print(a.toList())  # [1, 2, 3, 4]