Cython + pure Python for optional math overloads