title: Plotting log function with two variables
body: <p>I'm looking to plot some function but the logarithm function keeps giving me this error:</p>
  <blockquote>
  <p>TypeError: only size-1 arrays can be converted to Python scalars</p>
  </blockquote>
  <p>This is the code I'm using:</p>
  <pre><code>import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  from mpl_toolkits.mplot3d import Axes3D
  import math
  %matplotlib notebook
  
  def f10(x,y):
      return x*math.log(y,2) + y*math.log(x,2)
  
  x = np.linspace(-100, 100, 100)
  y = np.linspace(-100, 100, 100)
  #x = np.arange(-3.2, 3.2, 0.2)
  #y = np.arange(-3.2, 3.2, 0.2)
  X, Y = np.meshgrid(x, y)
  Z = f10(X,Y)
  
  fig = plt.figure(figsize = (10,10))
  ax = plt.axes(projection='3d')
  
  surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1,cmap='jet', edgecolor = 'none')
  ax.set_title(&quot;Surface&quot;, fontsize = 13)
  ax.set_xlabel('x', fontsize = 11)
  ax.set_ylabel('y', fontsize = 11)
  ax.set_zlabel('Z', fontsize = 11)
  
  plt.xlabel('x')
  plt.ylabel('y')
  
  
  func = np.vectorize(f10)
  fig, ax = plt.subplots(1)
  p=ax.contour(X, Y, func(X,Y))
  
  fig.colorbar(surf)
  
  plt.show()
  </code></pre>