0
Why my code isn't working?
17 Respuestas
+ 6
What @Jamie said:
type 'add', hit enter
type '1', hit enter
type '1', hit enter
type 'quit', hit submit
+ 1
How to fix my problem... im making a 'machine learning knn' and happen that error (Sorry my poor english)
train(x) = (112, 4)
test(x) = (38, 4) Traceback (most recent call last): File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 29, in <module> start(fakepyfile,mainpyfile) File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 28, in start exec(open(mainpyfile).read(), __main__.__dict__) File "<string>", line 49, in <module> File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/sklearn/neighbors/base.py", line 790, in fit return self._fit(X) File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/sklearn/neighbors/base.py", line 248, in _fit **self.effective_metric_params_) File "sklearn/neighbors/binary_tree.pxi", line 1081, in sklearn.neighbors.kd_tree.BinaryTree.__init__ ValueError: cannot convert float NaN to integer
[Program finished]
0
Actually it's not working in any of the IDE but in sololearn code playground,that too after one input it's showing error.
0
1st input - add or subtract or multiply or divide (any one)
after that i am selecting the numbers which I want to operate.
0
thanks
0
but why isn't it working in other IDEs?
0
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 29, in <module> start(fakepyfile,mainpyfile) File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 28, in start exec(open(mainpyfile).read(), __main__.__dict__) File "<string>", line 15 num2 = float(input("Enter another number: ")) ^ IndentationError: unindent does not match any outer indentation level [Program finished]
0
^ IndentationError: unindent does not match any outer indentation level [Program finished]
0
ok then lemme check my code
0
ok thanks
0
😊☺