Fix handling of 1D iterables of iterables in kmeans methods

The previous code would fail on inputs of [[1], [2], [3]] for example
because it would consider this a 1D input(which it is) but then would
try to perform float operations on the elements(such as [1]) which would
obviously fail. There is now a requirement for the special 1D case that
the input is 1D and not nested. That is, the elements of the 1D input
are not, themselves, iterable.