code: def asfloat(vari, limit=None):
      
      if limit is None:
          limit = 10**300
      if isinstance(vari, Poly):
          core = vari.A.copy()
          for key in vari.keys:
              core[key] = core[key]*1.
          return Poly(core, vari.dim, vari.shape, float)
  
      return numpy.asfarray(vari)
docs: Convert dtype of polynomial coefficients to float.
  
      Example:
          >>> poly = 2*cp.variable()+1
          >>> print(poly)
          2q0+1
          >>> print(cp.asfloat(poly))
          2.0q0+1.0