List manipulations¶
List of available functions¶
Examples¶
A few examples are given below
from wilfried.utilities.lists import transpose
# Generate mock list
l = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
print(l)
lt = transpose(l)
print(lt)
Documentation¶
Code author: Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
Fonctions related to manipulating lists.
- utilities.lists.transpose(theList)[source]¶
Code author: Wilfried Mercier - IRAP <wilfried.mercier@irap.omp.eu>
Compute the transpose of a list without the use of numpy.
- Parameters
theList (list) – list to transpose
- Returns
transposed list
- Return type
list
- Raises
TypeError – if theList is not a list