title: Python - error in drawing contour plot using scipy.integrate.quad
body: <p>I am trying to draw a contour plot in Python, using a slightly more complicated code than the below. But, the same problem arises in the following simple example: </p>
  
  <pre><code>import numpy as np
  from scipy import integrate
  import matplotlib.pyplot as plt
  
  def A(x):
      return integrate.quad(lambda i: x-i, 0, x)
  
  n = 100
  x = np.linspace(0, 10, n)
  y = np.linspace(0, 10, n)
  
  X, Y = np.meshgrid(x, y)
  M = A(X) + Y  # THE ERROR ARISES HERE
  
  plt.contour(X, Y, M)
  plt.show()
  </code></pre>
  
  <p>The following error message is shown at the line indicated above:</p>
  
  <pre><code>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>
  
  <p>I want to use <code>integrate.quad()</code>.</p>
  
  <p>Can anyone help me?
  Thanks in advance.</p>