Ensure w0 dimension is compatible with default K
Ensure drop=FALSE to distance matrix when K=1