Skip to content

Commit ff2d38d

Browse files
committed
fix the method monomials_of_degree
1 parent 104dde9 commit ff2d38d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/sage/rings/polynomial/multi_polynomial_ring_base.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ cdef class MPolynomialRing_base(sage.rings.ring.CommutativeRing):
444444
1/2*x^3 + x*y + z^2 - 1/2*x + y + 25
445445
446446
.. SEEALSO::
447-
447+
448448
:meth:`lagrange_polynomial<sage.rings.polynomial.polynomial_ring.PolynomialRing_field.lagrange_polynomial>`
449449
"""
450450
# get ring and number of variables
@@ -1387,8 +1387,9 @@ cdef class MPolynomialRing_base(sage.rings.ring.CommutativeRing):
13871387
sage: len(mons) == binomial(3+2-1,2)
13881388
True
13891389
"""
1390-
from sage.combinat.integer_vector import IntegerVectors
1391-
return [self.monomial(*a) for a in IntegerVectors(degree, self.ngens())]
1390+
deg_of_gens = [x.degree() for x in self.gens()]
1391+
from sage.combinat.integer_vector_weighted import WeightedIntegerVectors
1392+
return [self.monomial(*a) for a in WeightedIntegerVectors(degree, deg_of_gens)]
13921393

13931394
def _macaulay_resultant_getS(self, mon_deg_tuple, dlist):
13941395
r"""

0 commit comments

Comments
 (0)