SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions
flatten

Functions

template<domain D, type T, dim N>
D T flatten (D T[[N]] arr)
 

Detailed Description

Function for converting arrays to 1 dimensional.

Note
D - all protection domains
N - any array size of any dimension
T - any data type
Parameters
arr- input array
Returns
a 1-dimensional flattened version of the input array with the same type
For example: {{1,2,3}{4,5,6}} -> {1,2,3,4,5,6}

Function Documentation

◆ flatten()

D T flatten ( D T[[N]]  arr)