A pythonic abstraction for linear mathematical operators