title: Python Kernel died, restarting
body: <p>I am using Anaconda 3 and Python 3 on Windows 10 16 GB RAM 64 bit</p>
  
  <pre><code>C:\DATASET&gt;conda --version
  conda 4.3.4
  C:\DATASET&gt;python --version
  Python 3.5.2 :: Anaconda 4.0.0 (64-bit)\
  
  Spyder version 2.3.8
  windows 10
  </code></pre>
  
  <p>No matter where I give this command of about 32000 dataset it makes the kernel die and in python prompt direct the python program dies in windows.</p>
  
  <pre><code>1.import matplotlib.pyplot as plt
  2.#Basic relationship between x and y axis this is not residual plot
  3.plt.scatter(X_train,Y_train,color=['red','blue'])
  4.#Residual plots are here
  5.plt.scatter(lm.predict(X_train),(lm.predict(X_train) -      
  Y_train),s=40,alpha=0.5,color=['red','blue'])
  6.plt.scatter(lm.predict(X_test),(lm.predict(X_test) - Y_test),s=40,color=
  ['red','blue'])
  </code></pre>
  
  <p>In the Code above no matter where I run it in spyder or direct on python prompt the line 3 graph is plotted with no problem but the line 5. fails with the crash.
  Since it is crashing at plt matplotlib so I thought doing following should resolve:</p>
  
  <pre><code>conda update matplotlib
  </code></pre>
  
  <p>But this did not help at all there is still the problem on the 5 th line it crashes. I commented 5th and then ran the 6th line same crash problem.</p>
  
  <p>Below is a conda list installed packages:</p>
  
  <pre><code>C:DATASET&gt;conda list
  # packages in environment at C:\Anaconda3:
  #
  alabaster                 0.7.7                    py35_0
  anaconda                  4.0.0               np110py35_0
  anaconda-client           1.4.0                    py35_0
  anaconda-navigator        1.1.0                    py35_0
  argcomplete               1.0.0                    py35_1
  astropy                   1.1.2               np110py35_0
  babel                     2.2.0                    py35_0
  beautifulsoup4            4.4.1                    py35_0
  bitarray                  0.8.1                    py35_1
  blaze                     0.9.1                    py35_0
  bokeh                     0.11.1                   py35_0
  boto                      2.39.0                   py35_0
  bottleneck                1.0.0               np110py35_0
  bzip2                     1.0.6                    vc14_2  [vc14]
  cffi                      1.5.2                    py35_0
  chest                     0.2.3                    py35_0
  cloudpickle               0.1.1                    py35_0
  clyent                    1.2.1                    py35_0
  colorama                  0.3.7                    py35_0
  comtypes                  1.1.2                    py35_0
  conda                     4.3.4                    py35_0
  conda-build               1.20.0                   py35_0
  conda-env                 2.6.0                         0
  conda-manager             0.3.1                    py35_0
  configobj                 5.0.6                    py35_0
  console_shortcut          0.1.1                    py35_1
  cryptography              1.4                      py35_0
  curl                      7.45.0                   vc14_1  [vc14]
  cycler                    0.10.0                   py35_0
  cython                    0.23.4                   py35_0
  cytoolz                   0.7.5                    py35_0
  dask                      0.8.1                    py35_0
  datashape                 0.5.1                    py35_0
  decorator                 4.0.9                    py35_0
  dill                      0.2.4                    py35_0
  docutils                  0.12                     py35_1
  dynd-python               0.7.2                    py35_0
  et_xmlfile                1.0.1                    py35_0
  fastcache                 1.0.2                    py35_0
  flask                     0.10.1                   py35_1
  flask-cors                2.1.2                    py35_0
  freetype                  2.5.5                    vc14_0  [vc14]
  gevent                    1.1.0                    py35_0
  greenlet                  0.4.9                    py35_0
  h5py                      2.5.0               np110py35_4
  hdf5                      1.8.15.1                 vc14_4  [vc14]
  heapdict                  1.0.0                    py35_0
  icu                       57.1                     vc14_0  [vc14]
  idna                      2.0                      py35_0
  ipykernel                 4.3.1                    py35_0
  ipython                   4.1.2                    py35_1
  ipython_genutils          0.1.0                    py35_0
  ipywidgets                4.1.1                    py35_0
  itsdangerous              0.24                     py35_0
  jdcal                     1.2                      py35_0
  jedi                      0.9.0                    py35_0
  jinja2                    2.8                      py35_0
  jpeg                      8d                       vc14_0  [vc14]
  jsonschema                2.4.0                    py35_0
  jupyter                   1.0.0                    py35_2
  jupyter_client            4.2.2                    py35_0
  jupyter_console           4.1.1                    py35_0
  jupyter_core              4.1.0                    py35_0
  libdynd                   0.7.2                         0
  libpng                    1.6.27                   vc14_0  [vc14]
  libsodium                 1.0.3                         0
  libtiff                   4.0.6                    vc14_1  [vc14]
  llvmlite                  0.9.0                    py35_0
  locket                    0.2.0                    py35_0
  lxml                      3.6.0                    py35_0
  markupsafe                0.23                     py35_1
  matplotlib                1.5.3               np111p  y35_1
  menuinst                  1.3.2                    py35_0
  mistune                   0.7.2                    py35_0
  mkl                       2017.0.1                      0
  mkl-service               1.1.2                    py35_2
  mpmath                    0.19                     py35_0
  multipledispatch          0.4.8                    py35_0
  nbconvert                 4.1.0                    py35_0
  nbformat                  4.0.1                    py35_0
  networkx                  1.11                     py35_0
  nltk                      3.2                      py35_0
  nose                      1.3.7                    py35_0
  notebook                  4.1.0                    py35_2
  numba                     0.24.0              np110py35_0
  numexpr                   2.6.1               np111py35_2
  numpy                     1.11.3                   py35_0
  odo                       0.4.2                    py35_0
  openpyxl                  2.3.2                    py35_0
  openssl                   1.0.2g                   vc14_0  [vc14]
  pandas                    0.18.0              np110py35_0
  partd                     0.3.2                    py35_1
  path.py                   8.1.2                    py35_1
  patsy                     0.4.0               np110py35_0
  pep8                      1.7.0                    py35_0
  pickleshare               0.5                      py35_0
  pillow                    3.1.1                    py35_0
  pip                       8.1.1                    py35_1
  pip                       9.0.1                     &lt;pip&gt;
  ply                       3.8                      py35_0
  psutil                    4.1.0                    py35_0
  py                        1.4.31                   py35_0
  pyasn1                    0.1.9                    py35_0
  pycosat                   0.6.1                    py35_0
  pycparser                 2.14                     py35_0
  pycrypto                  2.6.1                    py35_3
  pyflakes                  1.1.0                    py35_0
  pygments                  2.1.1                    py35_0
  pymongo                   3.4.0                     &lt;pip&gt;
  pyopenssl                 16.2.0                   py35_0
  pyparsing                 2.0.3                    py35_0
  pyqt                      5.6.0                    py35_1
  pyreadline                2.1                      py35_0
  pytables                  3.2.2               np110py35_2
  pytest                    2.8.5                    py35_0
  python                    3.5.2                         0
  python-dateutil           2.5.1                    py35_0
  pytz                      2016.2                   py35_0
  pywin32                   220                      py35_1
  pyyaml                    3.11                     py35_3
  pyzmq                     15.2.0                   py35_0
  qt                        5.6.2                    vc14_0  [vc14]
  qtawesome                 0.3.2                    py35_0
  qtconsole                 4.2.0                    py35_1
  qtpy                      1.0                      py35_0
  requests                  2.12.4                   py35_0
  rope                      0.9.4                    py35_1
  ruamel_yaml               0.11.14                  py35_1
  scikit-image              0.12.3              np110py35_0
  scikit-learn              0.18.1              np111py35_1
  scipy                     0.18.1              np111py35_1
  seaborn                   0.7.1                     &lt;pip&gt;
  setuptools                20.3                     py35_0
  simplegeneric             0.8.1                    py35_0
  singledispatch            3.4.0.3                  py35_0
  sip                       4.18                     py35_0
  six                       1.10.0                   py35_0
  snowballstemmer           1.2.1                    py35_0
  sockjs-tornado            1.0.1                    py35_0
  sphinx                    1.3.5                    py35_0
  sphinx_rtd_theme          0.1.9                    py35_0
  spyder                    2.3.8                    py35_1
  sqlalchemy                1.0.12                   py35_0
  statsmodels               0.6.1               np110py35_0
  sympy                     1.0                      py35_0
  tk                        8.5.18                   vc14_0  [vc14]
  toolz                     0.7.4                    py35_0
  tornado                   4.3                      py35_0
  traitlets                 4.2.1                    py35_0
  unicodecsv                0.14.1                   py35_0
  vboxapi                   1.0                       &lt;pip&gt;
  vs2015_runtime            14.00.23026.0                 0
  werkzeug                  0.11.4                   py35_0
  wheel                     0.29.0                   py35_0
  xlrd                      0.9.4                    py35_0
  xlsxwriter                0.8.4                    py35_0
  xlwings                   0.7.0                    py35_0
  xlwt                      1.0.0                    py35_0
  zlib                      1.2.8                    vc14_2  [vc14]
  </code></pre>
  
  <p>The above packages are they giving any hint of conflict or any other problem?
  Please give any suggestion as I am stuck here.</p>
  
  <p>Updated Experiment of above:</p>
  
  <pre><code>xt=lm.predict(X_train)
  xytrain=xt-Y_train
  **plt.scatter(xt,xytrain)**
  
  **Kernel died, restarting**
  
  **Kernel died, restarting**
  </code></pre>
  
  <p>I thought instead of making the scatter function heavy maybe computing beforehand and then putting the variables into the function could help but no the kernel crashed as you can see above</p>