def init_nx_table(xlim=5,N=1001):
  """Go from -xlim to +xlim and make N entries, return us the dx and x0.
  if N is made odd it is better"""
  idx0 = int(N/2)
  tbl = pylab.zeros(N)  
  x = pylab.linspace(-xlim,xlim,N)
  dx = x[1] - x[0]
  tbl = nx(x)
  return x, tbl, idx0, dx
Go from -xlim to +xlim and make N entries, return us the dx and x0.
  if N is made odd it is better
recipes/Python/577776_Speeding_computations_using_looktable_part/recipe-577776.py