-
-
Notifications
You must be signed in to change notification settings - Fork 26.1k
Description
Describe the bug
Attribute error: 'str' object has no attribute 'tolist'.
Code dependency on 'annoy' library.
Steps/Code to Reproduce
https://gist.github.com/bjpcjp/f0d564979695504ba86e9e9e7254ed1e
Expected Results
example runs to completion with matplotlib-generated output
Actual Results
in fit(self, X)
14 self.annoy_ = annoy.AnnoyIndex(X.shape[1], metric=metric)
15 for i, x in enumerate(X):
---> 16 self.annoy_.add_item(i, x.tolist())
17 self.annoy_.build(self.n_trees)
18 return self
AttributeError: 'str' object has no attribute 'tolist'
Versions
System:
python: 3.8.8 | packaged by conda-forge | (default, Feb 20 2021, 16:22:27) [GCC 9.3.0]
executable: /home/bjpcjp/anaconda3/envs/working/bin/python3
machine: Linux-5.8.0-48-generic-x86_64-with-glibc2.10
Python dependencies:
pip: 20.2.4
setuptools: 50.3.2
sklearn: 0.24.1
numpy: 1.19.5
scipy: 1.5.4
Cython: 0.29.22
pandas: 1.1.4
matplotlib: 3.3.2
joblib: 0.17.0
threadpoolctl: 2.1.0
Built with OpenMP: True