Python versions of nearest correlation matrix algorithms