add NaN assertions to kmeans
fixed bug: was not clearing the map from previous iteration

I was doing this for reducers...silly me