You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
Traceback (most recent call last):
File "/Users/Bhoomit/work/robin/pysparnn/tests/test_pysparnn.py", line 52, in test_veccosine
return_distance=False)
File "pysparnn/cluster_pruning.py", line 274, in search
k_clusters=k_clusters))
File "pysparnn/cluster_pruning.py", line 208, in _search
max_distance=max_distance)
File "pysparnn/matrix_distance.py", line 81, in nearest_search
dist_matrix = self._distance(sparse_features)
File "pysparnn/matrix_distance.py", line 182, in _distance
return 1 - dprod.multiply(magnitude).toarray()
AttributeError: 'matrix' object has no attribute 'toarray'
I had to use return 1 - np.asarray(dprod.multiply(magnitude))
Am I doing something wrong? I'm using python 2.7 and virtualenv.
The text was updated successfully, but these errors were encountered:
Thanks for the feedback! For my own sanity, did you install with requirements.txt?
cd pysparnn
pip install -r requirements.txt
python setup.py install
I have noticed that the sparse matrix methods change a bit from version to version. If you have a patch that works on the latest versions of scipy/numpy I'd be happy to update the code!
@spencebeecher so I tried again and it worked, so may be I installed one of the modules without requirements.txt. Sorry my bad. I can still send PR with latest version of scipy/numpy.
I had to use
return 1 - np.asarray(dprod.multiply(magnitude))
Am I doing something wrong? I'm using python 2.7 and virtualenv.
The text was updated successfully, but these errors were encountered: