"generalized" DA stuff in Python (R?)