Names such as map
, filter
or sum
are generally understood by every resonably good programmer.
I wonder whether the following function f
also has such a standard name:
def f(data, idx): return [data[i] for i in idx]
I started with map
, but map
is generally understood as a function that applies a function on each element of a list.
Aucun commentaire:
Enregistrer un commentaire