SecreC 2 language 2.9.0 (2026.10)
Language and standard library reference
Loading...
Searching...
No Matches
Functions
flatten

Functions

template<domain D, type T, dim N>
D T flatten (D T 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()

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