title: How to set max output width in numpy?
body: <p>I am using a Jupyter notebook. I have a pretty wide screen, but the displayed output (say, when I print a <code>numpy</code> array) is formatted as if the screen was narrow.</p>
  
  <p>I found a way of increasing the width of the cells, with</p>
  
  <pre><code>from IPython.core.display import HTML
  HTML("&lt;style&gt;.container { width:95% !important; }&lt;/style&gt;")
  </code></pre>
  
  <p>but this seems to influence the input only, not the output (see screenshots):</p>
  
  <p><a href="https://i.stack.imgur.com/8RCdb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8RCdb.png" alt="short input"></a>
  <a href="https://i.stack.imgur.com/HHBxg.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HHBxg.png" alt="longer input"></a></p>
  
  <p>I've tried setting the <code>linewidth</code> option in <code>numpy.set_printoptions</code>, I've tried setting <code>numpy.core.arrayprint._line_width</code>, nothing...</p>
  
  <p>EDIT: Using matplotlib I can set the width of plots (that I plot in the notebook with the magic <code>%matplotlib inline</code>) with the command <code>plt.rcParams['figure.figsize']=[X,Y]</code>. It turns out that I can increase <code>X</code> to have plots fill the output cell horizontally all the way. This means (I think) that the original problem it's a <code>numpy</code> thing. </p>