I have a python function of many parameters
foo(x_1,...x_N)
Is there a pythonic way to transform it to a function that accepts a list of numpy.array?
Are you looking for:
x = [1, 2, 3, 4, 5]
foo(*x) # calls foo(1, 2, 3, 4, 5)
You can simply define the function as def foo(mylist) and then do whatever you want with it inside the function.
def foo(mylist):
''' mylist: an iterable '''
for item in mylist: # example
print(item)
np.arrayfoo(*X)?