How can solve the problem of numpy error? [on hold]











up vote
0
down vote

favorite












>>> from sklearn.tree import DecisionTreeClassifier
>>> clf_tree=DecisionTreeClassifier()
>>> clf_tree.fit(X_train,y_train)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/tree.py", line 799, in fit
X_idx_sorted=X_idx_sorted)
File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/tree.py", line 116, in fit
X = check_array(X, dtype=DTYPE, accept_sparse="csc")
File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/validation.py", line 522, in check_array
array = np.asarray(array, dtype=dtype, order=order)
File "/usr/local/lib/python3.5/dist-packages/numpy/core/numeric.py", line 482, in asarray
return array(a, dtype=object, copy=False, order=order)
ValueError: setting an array element with a sequence.









share|improve this question















put on hold as off-topic by Yaron, muru, karel, Eric Carvalho, N0rbert yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – Yaron, muru, karel, Eric Carvalho, N0rbert

If this question can be reworded to fit the rules in the help center, please edit the question.













  • This is not about Ubuntu. Questions about generic programming questions should be asked on Stack Overflow.
    – Yaron
    yesterday

















up vote
0
down vote

favorite












>>> from sklearn.tree import DecisionTreeClassifier
>>> clf_tree=DecisionTreeClassifier()
>>> clf_tree.fit(X_train,y_train)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/tree.py", line 799, in fit
X_idx_sorted=X_idx_sorted)
File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/tree.py", line 116, in fit
X = check_array(X, dtype=DTYPE, accept_sparse="csc")
File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/validation.py", line 522, in check_array
array = np.asarray(array, dtype=dtype, order=order)
File "/usr/local/lib/python3.5/dist-packages/numpy/core/numeric.py", line 482, in asarray
return array(a, dtype=object, copy=False, order=order)
ValueError: setting an array element with a sequence.









share|improve this question















put on hold as off-topic by Yaron, muru, karel, Eric Carvalho, N0rbert yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – Yaron, muru, karel, Eric Carvalho, N0rbert

If this question can be reworded to fit the rules in the help center, please edit the question.













  • This is not about Ubuntu. Questions about generic programming questions should be asked on Stack Overflow.
    – Yaron
    yesterday















up vote
0
down vote

favorite









up vote
0
down vote

favorite











>>> from sklearn.tree import DecisionTreeClassifier
>>> clf_tree=DecisionTreeClassifier()
>>> clf_tree.fit(X_train,y_train)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/tree.py", line 799, in fit
X_idx_sorted=X_idx_sorted)
File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/tree.py", line 116, in fit
X = check_array(X, dtype=DTYPE, accept_sparse="csc")
File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/validation.py", line 522, in check_array
array = np.asarray(array, dtype=dtype, order=order)
File "/usr/local/lib/python3.5/dist-packages/numpy/core/numeric.py", line 482, in asarray
return array(a, dtype=object, copy=False, order=order)
ValueError: setting an array element with a sequence.









share|improve this question















>>> from sklearn.tree import DecisionTreeClassifier
>>> clf_tree=DecisionTreeClassifier()
>>> clf_tree.fit(X_train,y_train)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/tree.py", line 799, in fit
X_idx_sorted=X_idx_sorted)
File "/usr/local/lib/python3.5/dist-packages/sklearn/tree/tree.py", line 116, in fit
X = check_array(X, dtype=DTYPE, accept_sparse="csc")
File "/usr/local/lib/python3.5/dist-packages/sklearn/utils/validation.py", line 522, in check_array
array = np.asarray(array, dtype=dtype, order=order)
File "/usr/local/lib/python3.5/dist-packages/numpy/core/numeric.py", line 482, in asarray
return array(a, dtype=object, copy=False, order=order)
ValueError: setting an array element with a sequence.






python






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









Yaron

8,72071939




8,72071939










asked yesterday









thaingi

1




1




put on hold as off-topic by Yaron, muru, karel, Eric Carvalho, N0rbert yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – Yaron, muru, karel, Eric Carvalho, N0rbert

If this question can be reworded to fit the rules in the help center, please edit the question.




put on hold as off-topic by Yaron, muru, karel, Eric Carvalho, N0rbert yesterday


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – Yaron, muru, karel, Eric Carvalho, N0rbert

If this question can be reworded to fit the rules in the help center, please edit the question.












  • This is not about Ubuntu. Questions about generic programming questions should be asked on Stack Overflow.
    – Yaron
    yesterday




















  • This is not about Ubuntu. Questions about generic programming questions should be asked on Stack Overflow.
    – Yaron
    yesterday


















This is not about Ubuntu. Questions about generic programming questions should be asked on Stack Overflow.
– Yaron
yesterday






This is not about Ubuntu. Questions about generic programming questions should be asked on Stack Overflow.
– Yaron
yesterday

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei