title: Kernel keeps dying when plotting a graph after importing the torch library
body: <p>I'm trying to run the following code:</p>
  <pre><code>import matplotlib.pyplot as plt
  %matplotlib inline
  import torch
  
  x = y = torch.tensor([1,2,3]).numpy()
  plt.plot(x,y);
  </code></pre>
  <p>I keep getting the message: <code>The kernel appears to have died. It will restart automatically.</code> and a restart and a red &quot;Dead kernel&quot; tag on the toolbar.</p>
  <p>But the weird thing is, if I import <code>matplotlib.pyplot</code> and plot some random graph first, the above code plots just fine. In other words, the following code works fine.</p>
  <pre><code>import matplotlib.pyplot as plt
  %matplotlib inline
  
  plt.subplots(figsize=(0.01,0.01))
  plt.gca().set_visible(False);
  
  import torch
  x = torch.tensor([1,2,3]).numpy()
  
  plt.plot(x,x);
  </code></pre>
  <p>What is going on here? I'm using numpy 1.18.5, pytorch 1.6.0, matplotlib 3.2.2 on Python 3.7.7, if it matters. Thank you.</p>