title: Shape of function output
body: <p>I have a function which gives me a numpy array with a certain shape, but I don't know yet which shape this array is going to be.</p>
  
  <p>Now I have another function which takes this function as an input. How can I extract now the information about the shape of the numpy array of the first function so I can use it in my second one?</p>
  
  <p>Example:</p>
  
  <pre><code>f1 = lambda x: np.array([[1,2,3],[4,5,6]]) # 2x3
  def f2(f):
      print(f.shape) # should give me (2,3) here
  
  In: f2(f1)
  </code></pre>
  
  <p>The problem is I want to code it that way so <code>f1</code> can have potentially an array with another shape but the code should work for every shape.</p>