https://github.com/NikVard/memstim-hh
Tip revision: 0b0be3e6f4a785b49b6b19f3af9c1d2718852a47 authored by NikVard on 14 February 2023, 10:07:04 UTC
[FIX] modified parallel_run2.sh
[FIX] modified parallel_run2.sh
Tip revision: 0b0be3e
annex_funcs.py
# -------------------------------------------
# Miscellaneous helper functions
# -------------------------------------------
def make_flat(old_list):
''' Takes as argument a list of lists and flattens it (i.e. returns a 1D list with all the elements) '''
new_list = []
for elem in old_list :
if type(elem)==list:
elem_flat = make_flat(elem)
new_list += elem_flat
else :
new_list.append(elem)
return new_list
