When I run the code with my own csv file, I get the following error:
Traceback (most recent call last):
File "kmeans.py", line 32, in
C_x = np.random.randint(0, np.max(X), size=k)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
TypeError: cannot perform reduce with flexible type
When I run the code with my own csv file, I get the following error: Traceback (most recent call last): File "kmeans.py", line 32, in
C_x = np.random.randint(0, np.max(X), size=k)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2320, in amax
out=out, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/_methods.py", line 26, in _amax
return umr_maximum(a, axis, None, out, keepdims)
TypeError: cannot perform reduce with flexible type
Any idea what might be going on?