ENH: Remove unused copy in k-means

One copy was done above the copy removed.
fix_gnb_proba
Changed f=open() to with open() as f to eliminate ResourceWarnings. Fixes #3410.