Tried to write 'calc_metric_tensor' on cython... failed.

  The code is slower than pure python and I really don't
  have any idea why.