add kmeans.csm.py for twodim