Skip to content

Commit

Permalink
Add a doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Feb 15, 2024
1 parent 4591ae8 commit 9685b89
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/sage/modules/submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@ def __init__(self, ambient, gens, check=True, already_echelonized=False):
sage: N = M.submodule([vector([x - y, z]), vector([y * z, x * z])])
sage: N.is_submodule(M)
True
::
sage: R.<x,y> = QQ[]
sage: S = R.quotient([x*y])
sage: M = FreeModule(S, 2)
sage: M.zero_submodule()
Submodule of Ambient free module of rank 2 over Quotient of Multivariate Polynomial Ring in x, y
over Rational Field by the ideal (x*y)
Generated by the rows of the matrix:
[]
"""
if not isinstance(ambient, (FreeModule_ambient, QuotientModule_free_ambient)):
raise TypeError("ambient (=%s) must be ambient or a quotient" % ambient)
Expand Down

0 comments on commit 9685b89

Please sign in to comment.