Evaluate a Legendre Series in Python using SWIG and C