added py wrapper to build covar matrix R fn