Skip to content

Commit a37eb29

Browse files
committed
fix and add doctests
1 parent ff2d38d commit a37eb29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sage/rings/polynomial/multi_polynomial_ring_base.pyx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,10 @@ cdef class MPolynomialRing_base(sage.rings.ring.CommutativeRing):
13791379
sage: R.<x,y,z> = ZZ[]
13801380
sage: mons = R.monomials_of_degree(2)
13811381
sage: mons
1382-
[x^2, x*y, x*z, y^2, y*z, z^2]
1382+
[z^2, y*z, x*z, y^2, x*y, x^2]
1383+
sage: P = PolynomialRing(QQ, 3, 'x,y,z', order=TermOrder('wdeglex', [1,2,1]))
1384+
sage: P.monomials_of_degree(2)
1385+
[y, z^2, x*z, x^2]
13831386
13841387
The number of such monomials equals `\binom{n+k-1}{k}`
13851388
where `n` is the number of variables and `k` the degree::

0 commit comments

Comments
 (0)