ContextLab / hypertools

A Python toolbox for gaining geometric insights into high-dimensional data
http://hypertools.readthedocs.io/en/latest/
MIT License
1.83k stars 160 forks source link

`plot_digits.py` => `no attribute 'index'` #85

Closed hughperkins closed 7 years ago

hughperkins commented 7 years ago
(env3) (master|✔) ~/git/hypertools/examples$ python plot_digits.py 
Traceback (most recent call last):
  File "plot_digits.py", line 21, in <module>
    hyp.plot(data, 'o', group=group)
  File "/home/ubuntu/env3/lib/python3.5/site-packages/hypertools/plot/plot.py", line 191, in plot
    x = reshape_data(x,group)
  File "/home/ubuntu/env3/lib/python3.5/site-packages/hypertools/_shared/helpers.py", line 127, in reshape_data
    categories = list(sorted(set(labels), key=labels.index))
AttributeError: 'numpy.ndarray' object has no attribute 'index'

My packages:

(env3) (master|✔) ~/git/hypertools/examples$ python -m pip freeze
appdirs==1.4.0
cycler==0.10.0
future==0.16.0
hypertools==0.1.5
matplotlib==1.5.3
numpy==1.12.0
packaging==16.8
pandas==0.19.2
pkg-resources==0.0.0
ppca==0.0.2
pyparsing==2.1.10
python-dateutil==2.6.0
pytz==2016.10
scikit-learn==0.18.1
scipy==0.18.1
seaborn==0.7.1
six==1.10.0

python version:

(env3) (master|✔) ~/git/hypertools/examples$ python -V
Python 3.5.2
andrewheusser commented 7 years ago

should be fixed now 4930a7a, thanks :)

hughperkins commented 7 years ago

Thanks! :-) Will take a look.