title: Keep getting error message"operands could not be broadcast together with shapes (3,) (2,)" How do I get solve this?
body: <p>my problem is that i'm trying to create a function in python that takes the input of two vectors; <code>M = metabolic</code> heat production and <code>g = thermal</code> conductance, and returns and output <code>T</code>, which is a Nm x Ng(where N = number of elements in the concerned vector) matrix that contains the values for survival temperatures. These values come the formula T_f and they need to be inserted into the matrix T. 
     My problem is that every time I try to run my code i get the error message:</p>
  
  <pre><code>operands could not be broadcast together with shapes (3,) (2,).
  </code></pre>
  
  <p>Where the error message originates from the T_f formula. How do i solve this and how do i take the values from T_f and combine them into the matrix T? 
  My code is as follows:</p>
  
  <pre><code>import numpy as np
  def survivalTemperature(M,g):
      if (np.all([M])&gt;=50 or np.all([M]) &lt;=500) or (np.all([g])&gt;=0.04 or np.all([g])&lt;=0.45):
          T_f = 36-(((0.9*M-12)*(g+0.95))/27.8)
          T = T_f
      else:
          T = "RangeError"
      return T
  print(survivalTemperature(np.array([50,200,300]),np.array([0.20,0.14])))
  </code></pre>