# Ticket #10532: trac_10532_send_to_bg.patch

File trac_10532_send_to_bg.patch, 1.7 KB (added by pernici, 8 years ago)
• ## sage/rings/multi_power_series_ring.py

```# 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 try: f = self._poly_ring(f) except TypeError: raise TypeError("Cannot coerce input to polynomial ring.") degs = f.degrees() if degs: emax = 0 f1 = [0]*(sum(degs)+1) raise TypeError("Cannot coerce input to polynomial ring.") if self.__ngens > 1: degs = f.degrees() if degs: emax = 0 f1 = [0]*(sum(degs)+1) for x in f: e = sum(x[1].degrees()) if e > emax: emax = e f1[e] += x[0]*x[1] f1 = f1[:emax+1] else: f1 = f else: e = 0 arg = f.args()[0] f1 = [] for x in f: e = sum(x[1].degrees()) if e > emax: emax = e f1[e] += x[0]*x[1] f1 = f1[:emax+1] else: f1 = f f1.append(x*arg**e) e += 1 return self._bg_ps_ring(f1) def _send_to_fg(self,f):