def run(fn, name, imshow=False):
  print 
  print "---", name 
  for (prefix, wrapper) in [('parakeet-', jit), ('numba-', autojit)]:
    try:
      wrapped_fn = wrapper(fn)
      with timer(prefix + name + '-compile', True):
        wrapped_fn(image[:1, :1], k)
      with timer(prefix + name, False):
        result = wrapped_fn(image, k)
      if imshow:
        import pylab
        pylab.imshow(image)
        pylab.figure()
        pylab.imshow(result)
        pylab.figure()
        if scipy_result is not None:
          pylab.imshow(scipy_result)
          pylab.show()
      if not running_pypy and scipy_result is not None:
        assert allclose(result, scipy_result)

    except __HOLE__:
      raise   
    except:
      print "%s failed" % (prefix+name)
      import sys 
      print sys.exc_info()[1]
dataset/ETHPy150Open iskandr/parakeet/benchmarks/morphology.py/run