COO.flatten
- COO.flatten(order='C')[source]
Returns a new
COO
array that is a flattened version of this array.- Returns:
The flattened output array.
- Return type:
Notes
The
order
parameter is provided just for compatibility with Numpy and isn’t actually supported.Examples
>>> s = COO.from_numpy(np.arange(10)) >>> s2 = s.reshape((2, 5)).flatten() >>> s2.todense() array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])