# HG changeset patch
# User Mario Pernici <mario.pernici@gmail.com>
# Date 1297789792 3600
# Node ID 51a9c88937ff0fb27dbb974a49e4fa1c1c9b5747
# Parent 4fc3ac12bee5ee0c652e2289b2b0c2b0b5f44506
fixed bug in _send_to_bg in the case of multivariate series of 1 variable
diff r 4fc3ac12bee5 r 51a9c88937ff sage/rings/multi_power_series_ring.py
a

b


988  988  try: 
989  989  f = self._poly_ring(f) 
990  990  except TypeError: 
991   raise TypeError("Cannot coerce input to polynomial ring.") 
992   degs = f.degrees() 
993   if degs: 
994   emax = 0 
995   f1 = [0]*(sum(degs)+1) 
 991  raise TypeError("Cannot coerce input to polynomial ring.") 
 992  if self.__ngens > 1: 
 993  degs = f.degrees() 
 994  if degs: 
 995  emax = 0 
 996  f1 = [0]*(sum(degs)+1) 
 997  for x in f: 
 998  e = sum(x[1].degrees()) 
 999  if e > emax: 
 1000  emax = e 
 1001  f1[e] += x[0]*x[1] 
 1002  f1 = f1[:emax+1] 
 1003  else: 
 1004  f1 = f 
 1005  else: 
 1006  e = 0 
 1007  arg = f.args()[0] 
 1008  f1 = [] 
996  1009  for x in f: 
997   e = sum(x[1].degrees()) 
998   if e > emax: 
999   emax = e 
1000   f1[e] += x[0]*x[1] 
1001   f1 = f1[:emax+1] 
1002   else: 
1003   f1 = f 
 1010  f1.append(x*arg**e) 
 1011  e += 1 
1004  1012  return self._bg_ps_ring(f1) 
1005  1013  
1006  1014  def _send_to_fg(self,f): 