Closed jzyee closed 6 years ago
Can you report your scipy version? The demo should work on recent versions of scipy (like v1.0). Specificly, in scipy\sparse\compressed.py, self.data = np.array(data, copy=copy, dtype=getdtype(dtype, data))
is changed to self.data = np.array(data, copy=copy, dtype=dtype)
and should solve your issue.
in conda list it says its 0.16.0
however when i run import scipy and run scipy.version i get '1.0.0' so i believe it is scipy v1.0.
i tried doing as mention above for the change in code to compressed.py but it still gave the same error so I've done this: training_data = np.array(loaddataset(training)) testing_data = np.array(loaddataset(testing))
and now the error is :
NotImplementedError Traceback (most recent call last)
That won't work since load_dataset(training_)
returns a list of Instance objects, which contain information such as labels, and cannot be turned into np arrays directly.
To solve your previous problem, I suggest you check the kernel environment of Jupyter Notebook, assuming you are running the demo on it. It is likely that the kernel you are using has scipy v0.16.0 installed, which is outdated for this project.
i restarted the kernel and everything worked out, thanks!
I have install all listed dependencies in the readme file and when i run the demo code i get the following error:
AttributeError Traceback (most recent call last) C:\Users\Anaconda3\lib\site-packages\scipy\sparse\sputils.py in getdtype(dtype, a, default) 115 try: --> 116 newdtype = a.dtype 117 except AttributeError:
AttributeError: 'list' object has no attribute 'dtype'
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)