title: Storing polynomials as is from the from poly1D() function into a list
body: <p>I want to store the polynomials into a list but when I append them into the list they lose the variable x and just have the coefficients.</p>
  
  <pre><code>import numpy as np
  from numpy import random
  from pylab import *
  from sklearn.metrics import r2_score
  
  np.random.seed(2)
  pageSpeeds = np.random.normal(3.0, 1.0, 1000)
  
  # purchaseAmount function (non-linear)
  purchaseAmount = np.random.normal(50.0, 10.0, 1000) / pageSpeeds
  
  x = np.array(pageSpeeds)
  y = np.array(purchaseAmount)
  
  polyfitInit = {1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0, 10:0, 11:0, 12:0, 13:0, 14:0, 15:0}
  polyforms = []
  for c in polyfitInit:
      z = np.poly1d(np.polyfit(x, y, c))
      r2 = r2_score(y, z(x))
      polyfitInit[c] = r2
      polyforms.append(z)
  
  print polyforms
  </code></pre>
  
  <p>Ouptut now: </p>
  
  <p>[poly1d([ -9.04306562,  46.68709008]), poly1d([  3.73263241, -31.78596189,  77.53159067]...]</p>
  
  <p>Output wanted: 
  [-9.043 x + 46.69,  3.73263241x^2 + -31.78596189x + 77.53159067...]</p>
  
  <p>Thanks guys</p>