0

It is a Visual Studio issue. It's running fine on other platforms like IPython notebook. Can you please suggest what is the issue.

Though it is a very simple code, it is running infinitely and not giving any output.

from sklearn import preprocessing


X = [3,4,5,1,8,7,6,9,2]
X= preprocessing.scale(X)
print (X)

sklearn is installed. I have also tried adding:

from sklearn.preprocessing import scale

There is no syntax error. I'm using Python 2.7 on Visual Studio, Ubuntu.

Satyam
  • 393
  • 1
  • 5
  • 16
  • 2
    `[-0.77459667 -0.38729833 0. -1.54919334 1.161895 0.77459667 0.38729833 1.54919334 -1.161895 ]` Works fine. Visual studio issue? – cs95 Jul 04 '17 at 14:15
  • 3
    Maybe. Can you please suggest why it comes, if you know? What can be the possible reasons? I have lately installed github. Does it affect this? – Satyam Jul 04 '17 at 14:31
  • @Satyam could you please share how exactly do you run this code? – mkaran Jul 04 '17 at 14:41
  • 1
    You're writing in Python in _Visual Studio_ for __Ubuntu__??? I'd say, that's quite a mashup XD. I think you should move away from VS to something like PyCharm or simply Sublime Text. You'll have less problems with them, to my mind. Note that my opinion may be slightly biased as I don't quite like VS. – ForceBru Jul 04 '17 at 14:45
  • 3
    @mkaran I have written the code in VS and run it by pressing Ctrl+Shift+B. It used to run fine before but today it showed this problem. i don't remember making any major changes in VS except for installing GitHub. If I recall any other changes, in case I'd made, I'll duly inform you. – Satyam Jul 04 '17 at 15:50
  • @Satyam something like [this](https://stackoverflow.com/a/29989061/3433323) ? – mkaran Jul 04 '17 at 15:53
  • 1
    Yes. { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "0.1.0", "command": "python", "isShellCommand": true, "args": ["${file}"], "showOutput": "always", } – Satyam Jul 04 '17 at 15:55

0 Answers0