Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

TypeError: index must be a pair of integers or slices #218

Open
ghost opened this issue Aug 28, 2016 · 0 comments
Open

TypeError: index must be a pair of integers or slices #218

ghost opened this issue Aug 28, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 28, 2016

when I run nosetests -v sknn.tests, I got the error :TypeError: index must be a pair of integers or slices。How to solve this problem??? thank you very much!

ERROR: test_Predict64 (sknn.tests.test_types.TestScipySparseMatrix)

Traceback (most recent call last):
File "/Users/lihui/Documents/ML/scikit-neuralnetwork/sknn/tests/test_types.py", line 69, in test_Predict64
yp = self.nn._predict(X)
File "/Users/lihui/Documents/ML/scikit-neuralnetwork/sknn/mlp.py", line 262, in _predict
return self._backend._predict_impl(X)
File "/Users/lihui/Documents/ML/scikit-neuralnetwork/sknn/backend/lasagne/mlp.py", line 273, in _predict_impl
for Xb, _, _, idx in self._iterate_data(self.batch_size, X, y, shuffle=False):
File "/Users/lihui/Documents/ML/scikit-neuralnetwork/sknn/backend/lasagne/mlp.py", line 308, in _iterate_data
Xb, yb, wb = cast(X, excerpt), cast(y, excerpt), cast(w, excerpt)
File "/Users/lihui/Documents/ML/scikit-neuralnetwork/sknn/backend/lasagne/mlp.py", line 293, in cast
array = array[indices]
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/sparse/dok.py", line 140, in getitem
raise TypeError('index must be a pair of integers or slices')
TypeError: index must be a pair of integers or slices

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants