Use tuple-returning Python function in another function call

python

Solution

Try this:

bar(np.array([7,8]), *fu())

(unpack the tuple returned by `fu()`)

Problem

I'm trying to do something like this in my code: ``` def fu(): return np.array([1,2,3]), np.array([4,5,6]) def bar(x,y,z): print np.size(x) print np.size(y) print np.size(z) bar(np.array([7,8]), fu()) ``` but I'm getting an error message saying `bar() takes exactly 3 arguments (2 given)`. How can I solve this problem?

Original source