bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def crt(a,b,m=None,n=None): r""" Use the Chinese Remainder Theorem to find some `x` such that `x=a \bmod m` and `x=b \bmod n`. Note that `x` is only well-defined modulo `m\*n`. EXAMPLES:: sage: crt(2, 1, 3, 5) -4 sage: crt(13,20,100,301) -2087 You can also use upper case:: sage: c = CRT(2,3, 3, 5); c 8 sage: c % 3 ... | def crt(a,b,m=None,n=None): r""" Use the Chinese Remainder Theorem to find some `x` such that `x=a \bmod m` and `x=b \bmod n`. Note that `x` is only well-defined modulo `m*n`. EXAMPLES:: sage: crt(2, 1, 3, 5) -4 sage: crt(13,20,100,301) -2087 You can also use upper case:: sage: c = CRT(2,3, 3, 5); c 8 sage: c % 3 =... | 459,000 |
def install_packages(self, package_name): """ Install an R package into Sage's R installation. | def install_packages(self, package_name): """ Install an R package into Sage's R installation. | 459,001 |
def install_packages(self, package_name): """ Install an R package into Sage's R installation. | def install_packages(self, package_name): """ Install an R package into Sage's R installation. | 459,002 |
def __init__(self, maxread=10000, script_subdirectory=None, logfile=None, server=None, server_tmpdir=None, user_config=False): """ INPUT: - ``maxread`` - affects buffering - ``script_subdirectory`` - directory where scripts are read from - ``logfile`` - output logged to this file - ``server`` - address of remo... | def __init__(self, maxread=10000, script_subdirectory=None, logfile=None, server=None, server_tmpdir=None, user_config=False): """ INPUT: - ``maxread`` - affects buffering - ``script_subdirectory`` - directory where scripts are read from - ``logfile`` - output logged to this file - ``server`` - address of remo... | 459,003 |
def magma_console(): """ Run a command line Magma session. EXAMPLES:: sage: magma_console() # not tested Magma V2.14-9 Sat Oct 11 2008 06:36:41 on one [Seed = 1157408761] Type ? for help. Type <Ctrl>-D to quit. > Total time: 2.820 seconds, Total memory usage: 3.95MB """ console('magma') | def magma_console(): """ Run a command line Magma session. EXAMPLES:: sage: magma_console() # not tested Magma V2.14-9 Sat Oct 11 2008 06:36:41 on one [Seed = 1157408761] Type ? for help. Type <Ctrl>-D to quit. > Total time: 2.820 seconds, Total memory usage: 3.95MB """ console('sage-native-exec... | 459,004 |
def tachyon_repr(self, render_params): """ Returns representation of the point suitable for plotting using the Tachyon ray tracer. | def tachyon_repr(self, render_params): """ Returns representation of the point suitable for plotting using the Tachyon ray tracer. | 459,005 |
def obj_repr(self, render_params): """ Returns complete representation of the point as a sphere. | def obj_repr(self, render_params): """ Returns complete representation of the point as a sphere. | 459,006 |
def tachyon_repr(self, render_params): """ Returns representation of the line suitable for plotting using the Tachyon ray tracer. | def tachyon_repr(self, render_params): """ Returns representation of the line suitable for plotting using the Tachyon ray tracer. | 459,007 |
def _call_element_(self, _the_element, *args, **kwds): """ Calling a callable symbolic expression returns a symbolic expression with the appropriate arguments substituted. EXAMPLES:: sage: var('a, x, y, z') (a, x, y, z) sage: f(x,y) = a + 2*x + 3*y + z sage: f (x, y) |--> a + 2*x + 3*y + z sage: f(1,2) a + z + 8 sage... | def _call_element_(self, _the_element, *args, **kwds): """ Calling a callable symbolic expression returns a symbolic expression with the appropriate arguments substituted. EXAMPLES:: sage: var('a, x, y, z') (a, x, y, z) sage: f(x,y) = a + 2*x + 3*y + z sage: f (x, y) |--> a + 2*x + 3*y + z sage: f(1,2) a + z + 8 sage... | 459,008 |
def diamond_bracket_operator(self, d): r""" Return the diamond bracket d operator on this modular symbols space. | def diamond_bracket_operator(self, d): r""" Return the diamond bracket d operator on this modular symbols space. | 459,009 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def subgraph_search(self, G, induced=False): r""" Returns an induced copy of `G` in self. | 459,010 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,011 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,012 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,013 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,014 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,015 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,016 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,017 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,018 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,019 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,020 |
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self. | 459,021 |
def _render_on_subplot(self, subplot): """ TESTS: | def _render_on_subplot(self, subplot): """ TESTS: | 459,022 |
def _render_on_subplot(self, subplot): """ TESTS: | def _render_on_subplot(self, subplot): """ TESTS: | 459,023 |
def _render_on_subplot(self, subplot): """ TESTS: | def _render_on_subplot(self, subplot): """ TESTS: | 459,024 |
def contour_plot(f, xrange, yrange, **options): r""" ``contour_plot`` takes a function of two variables, `f(x,y)` and plots contour lines of the function over the specified ``xrange`` and ``yrange`` as demonstrated below. ``contour_plot(f, (xmin, xmax), (ymin, ymax), ...)`` INPUT: - ``f`` -- a function of two variab... | def contour_plot(f, xrange, yrange, **options): r""" ``contour_plot`` takes a function of two variables, `f(x,y)` and plots contour lines of the function over the specified ``xrange`` and ``yrange`` as demonstrated below. ``contour_plot(f, (xmin, xmax), (ymin, ymax), ...)`` INPUT: - ``f`` -- a function of two variab... | 459,025 |
def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth,**options): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax),... | def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth,**options): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax),... | 459,026 |
def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth,**options): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax),... | def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth,**options): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax),... | 459,027 |
def __init__(self, name, args, kwds): """ TESTS:: sage: f = attrcall('core', 3) sage: loads(dumps(f)) *.core(3) """ self.name = name self.args = args self.kwds = kwds | def __init__(self, name, args, kwds): """ TESTS:: sage: f = attrcall('core', 3); f *.core(3) """ self.name = name self.args = args self.kwds = kwds | 459,028 |
def __repr__(self): """ Returns a string representation of this object. The star in the output represents the object passed into self. EXAMPLES:: sage: attrcall('core', 3) *.core(3) sage: attrcall('hooks', flatten=True) *.hooks(flatten=True) sage: attrcall('hooks', 3, flatten=True) *.hooks(3, flatten=True) """ s = "... | def __repr__(self): """ Returns a string representation of this object. The star in the output represents the object passed into self. EXAMPLES:: sage: attrcall('core', 3) *.core(3) sage: attrcall('hooks', flatten=True) *.hooks(flatten=True) sage: attrcall('hooks', 3, flatten=True) *.hooks(3, flatten=True) """ s = "... | 459,029 |
def __repr__(self): """ Returns a string representation of this object. The star in the output represents the object passed into self. EXAMPLES:: sage: attrcall('core', 3) *.core(3) sage: attrcall('hooks', flatten=True) *.hooks(flatten=True) sage: attrcall('hooks', 3, flatten=True) *.hooks(3, flatten=True) """ s = "... | def __repr__(self): """ Returns a string representation of this object. The star in the output represents the object passed into self. EXAMPLES:: sage: attrcall('core', 3) *.core(3) sage: attrcall('hooks', flatten=True) *.hooks(flatten=True) sage: attrcall('hooks', 3, flatten=True) *.hooks(3, flatten=True) """ s = "... | 459,030 |
def __repr__(self): """ Returns a string representation of this object. The star in the output represents the object passed into self. EXAMPLES:: sage: attrcall('core', 3) *.core(3) sage: attrcall('hooks', flatten=True) *.hooks(flatten=True) sage: attrcall('hooks', 3, flatten=True) *.hooks(3, flatten=True) """ s = "... | def __repr__(self): """ Returns a string representation of this object. The star in the output represents the object passed into self. def __eq__(self, other): """ Equality testing EXAMPLES:: sage: attrcall('core', 3, flatten = True) == attrcall('core', 3, flatten = True) True sage: attrcall('core', 2) == attrcall('c... | 459,031 |
def attrcall(name, *args, **kwds): """ Returns a callable which takes in an object, gets the method named name from that object, and calls it with the specified arguments and keywords. INPUT: - ``name`` - a string of the name of the method you want to call - ``args, kwds`` - arguments and keywords to be passed to... | def attrcall(name, *args, **kwds): """ Returns a callable which takes in an object, gets the method named name from that object, and calls it with the specified arguments and keywords. INPUT: - ``name`` - a string of the name of the method you want to call - ``args, kwds`` - arguments and keywords to be passed to... | 459,032 |
def attrcall(name, *args, **kwds): """ Returns a callable which takes in an object, gets the method named name from that object, and calls it with the specified arguments and keywords. INPUT: - ``name`` - a string of the name of the method you want to call - ``args, kwds`` - arguments and keywords to be passed to... | def attrcall(name, *args, **kwds): """ Returns a callable which takes in an object, gets the method named name from that object, and calls it with the specified arguments and keywords. INPUT: - ``name`` - a string of the name of the method you want to call - ``args, kwds`` - arguments and keywords to be passed to ... | 459,033 |
def attrcall(name, *args, **kwds): """ Returns a callable which takes in an object, gets the method named name from that object, and calls it with the specified arguments and keywords. INPUT: - ``name`` - a string of the name of the method you want to call - ``args, kwds`` - arguments and keywords to be passed to... | def attrcall(name, *args, **kwds): """ Returns a callable which takes in an object, gets the method named name from that object, and calls it with the specified arguments and keywords. INPUT: - ``name`` - a string of the name of the method you want to call - ``args, kwds`` - arguments and keywords to be passed to... | 459,034 |
def __init__(self, deprecated=None, **renames): """ A decorator which renames keyword arguments and optionally deprecates the new keyword. INPUT: - ``deprecated`` - If the option being renamed is deprecated, this is the Sage version where the deprecation initially occurs. - the rest of the arguments is a list of keyw... | def __init__(self, deprecated=None, **renames): """ A decorator which renames keyword arguments and optionally deprecates the new keyword. INPUT: - ``deprecated`` - If the option being renamed is deprecated, this is the Sage version where the deprecation initially occurs. - the rest of the arguments is a list of keyw... | 459,035 |
def __init__(self, deprecated=None, **renames): """ A decorator which renames keyword arguments and optionally deprecates the new keyword. INPUT: - ``deprecated`` - If the option being renamed is deprecated, this is the Sage version where the deprecation initially occurs. - the rest of the arguments is a list of keyw... | def __init__(self, deprecated=None, **renames): """ A decorator which renames keyword arguments and optionally deprecates the new keyword. INPUT: - ``deprecated`` - If the option being renamed is deprecated, this is the Sage version where the deprecation initially occurs. - the rest of the arguments is a list of key... | 459,036 |
def __init__(self, deprecated=None, **renames): """ A decorator which renames keyword arguments and optionally deprecates the new keyword. INPUT: - ``deprecated`` - If the option being renamed is deprecated, this is the Sage version where the deprecation initially occurs. - the rest of the arguments is a list of keyw... | def__init__(self,deprecated=None,**renames):"""Adecoratorwhichrenameskeywordargumentsandoptionallydeprecatesthenewkeyword.INPUT:-``deprecated``-Iftheoptionbeingrenamedisdeprecated,thisistheSageversionwherethedeprecationinitiallyoccurs.-therestoftheargumentsisalistofkeywordargumentsintheform``renamed_option='existing_op... | 459,037 |
def _pcubicroots(b, c, d): r""" Local function returning the number of roots of `x^3 + b*x^2 + c*x + d` modulo `P`, counting multiplicities """ return sum([rr[1] for rr in PolynomialRing(F, 'x')([d, c, b, 1]).roots()],0) | def _pcubicroots(b, c, d): r""" Local function returning the number of roots of `x^3 + b*x^2 + c*x + d` modulo `P`, counting multiplicities """ return sum([rr[1] for rr in PolynomialRing(F, 'x')([d, c, b, 1]).roots()],0) | 459,038 |
def __init__(self, parent, value, check=True): """ Create element of a finite field. EXAMPLES:: sage: from sage.rings.finite_rings.finite_field_ext_pari import FiniteField_ext_pari sage: k = FiniteField_ext_pari(9,'a') sage: a = k(11); a 2 sage: a.parent() Finite Field in a of size 3^2 sage: V = k.vector_space(); v =... | def __init__(self, parent, value, check=True): """ Create element of a finite field. EXAMPLES:: sage: from sage.rings.finite_rings.finite_field_ext_pari import FiniteField_ext_pari sage: k = FiniteField_ext_pari(9,'a') sage: a = k(11); a 2 sage: a.parent() Finite Field in a of size 3^2 sage: V = k.vector_space(); v =... | 459,039 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 459,040 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 459,041 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 459,042 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 459,043 |
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) | 459,044 |
def _repr_(self): """ The printing representation of self. EXAMPLES:: sage: V = VectorSpace(QQ,5) sage: U = V.submodule([ V.gen(i) - V.gen(0) for i in range(1,5) ]) sage: print U # indirect doctest Vector space of degree 5 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -1] [ 0 1 0 0 -1] [ 0 0 1 ... | def _repr_(self): """ The printing representation of self. EXAMPLES:: sage: V = VectorSpace(QQ,5) sage: U = V.submodule([ V.gen(i) - V.gen(0) for i in range(1,5) ]) sage: print U # indirect doctest Vector space of degree 5 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -1] [ 0 1 0 0 -1] [ 0 0 1 ... | 459,045 |
def _repr_(self): """ The default printing representation of self. EXAMPLES:: sage: V = VectorSpace(QQ,5) sage: U = V.submodule([ V.gen(i) - V.gen(0) for i in range(1,5) ]) sage: print U # indirect doctest Vector space of degree 5 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -1] [ 0 1 0 0 -1] [ 0... | def _repr_(self): """ The default printing representation of self. EXAMPLES:: sage: V = VectorSpace(QQ,5) sage: U = V.submodule([ V.gen(i) - V.gen(0) for i in range(1,5) ]) sage: print U # indirect doctest Vector space of degree 5 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -1] [ 0 1 0 0 -1] [ 0... | 459,046 |
def get_colors(self, list): """ Parameters: list: an iterable collection of values which can be cast into colors -- typically an RGB triple, or an RGBA 4-tuple Returns: a list of single parameters which can be passed into the set_color method of the Triangle or SmoothTriangle objects generated by this factory. TESTS:... | def get_colors(self, list): """ Parameters: list: an iterable collection of values which can be cast into colors -- typically an RGB triple, or an RGBA 4-tuple Returns: a list of single parameters which can be passed into the set_color method of the Triangle or SmoothTriangle objects generated by this factory. TESTS:... | 459,047 |
def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | 459,048 |
def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | 459,049 |
def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | 459,050 |
def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | def TESTS:: sage: solve([sin(x)==x,y^2==x],x,y) [sin(x) == x, y^2 == x] sage: solve(0==1,x) Traceback (most recent call last): ... TypeError: object of type 'bool' has no len() Test if the empty list is returned, too, when (a list of) dictionaries (is) are requested ( sage: solve([0==1],x) [] sage: solve([0==1],x,so... | 459,051 |
def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | 459,052 |
def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | def solve(f, *args, **kwds): r""" Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported. INPUT: - ``f`` - equation or system of equations (given by a list or tuple) - ``*args`` - variables to solve for. - ... | 459,053 |
def solve_mod(eqns, modulus, solution_dict = False): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. By default the solutions are returned as `n`-tuples, where `n` is the number of variables appearing an... | def solve_mod(eqns, modulus, solution_dict = False): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. By default the solutions are returned as `n`-tuples, where `n` is the number of variables appearing an... | 459,054 |
def solve_mod(eqns, modulus, solution_dict = False): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. By default the solutions are returned as `n`-tuples, where `n` is the number of variables appearing an... | def solve_mod(eqns, modulus, solution_dict = False): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. By default the solutions are returned as `n`-tuples, where `n` is the number of variables appearing an... | 459,055 |
def solve_mod(eqns, modulus, solution_dict = False): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. By default the solutions are returned as `n`-tuples, where `n` is the number of variables appearing an... | def solve_mod(eqns, modulus, solution_dict = False): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. By default the solutions are returned as `n`-tuples, where `n` is the number of variables appearing an... | 459,056 |
def solve_mod(eqns, modulus, solution_dict = False): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. By default the solutions are returned as `n`-tuples, where `n` is the number of variables appearing an... | def solve_mod(eqns, modulus, solution_dict = False): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. By default the solutions are returned as `n`-tuples, where `n` is the number of variables appearing an... | 459,057 |
def solve_mod_enumerate(eqns, modulus): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. The solutions are returned as `n`-tuples, where `n` is the number of variables appearing anywhere in the given equa... | def solve_mod_enumerate(eqns, modulus): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. The solutions are returned as `n`-tuples, where `n` is the number of variables appearing anywhere in the given equa... | 459,058 |
def solve_mod_enumerate(eqns, modulus): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. The solutions are returned as `n`-tuples, where `n` is the number of variables appearing anywhere in the given equa... | def solve_mod_enumerate(eqns, modulus): r""" Return all solutions to an equation or list of equations modulo the given integer modulus. Each equation must involve only polynomials in 1 or many variables. The solutions are returned as `n`-tuples, where `n` is the number of variables appearing anywhere in the given equa... | 459,059 |
def hasse_invariant(self): r""" Returns the Hasse invariant of an elliptic curve over a field of positive characteristic, which is an element of the field. | def hasse_invariant(self): r""" Returns the Hasse invariant of an elliptic curve over a field of positive characteristic, which is an element of the field. | 459,060 |
def hasse_invariant(self): r""" Returns the Hasse invariant of an elliptic curve over a field of positive characteristic, which is an element of the field. | def hasse_invariant(self): r""" Returns the Hasse invariant of an elliptic curve over a field of positive characteristic, which is an element of the field. | 459,061 |
def replace_parens(x): r""" A map from '(' to open_symbol and ')' to close_symbol and otherwise an error is raised. EXAMPLES:: sage: from sage.combinat.dyck_word import replace_parens sage: replace_parens('(') 1 sage: replace_parens(')') 0 sage: replace_parens(1) Traceback (most recent call last): ... ValueError """ ... | def replace_parens(x): r""" A map from ``'('`` to ``open_symbol`` and ``')'`` to ``close_symbol`` and otherwise an error is raised. The values of the constants ``open_symbol`` and ``close_symbol`` are subject to change. This is the inverse map of :func:`replace_symbols`. INPUT: - ``x`` -- either an opening or closing... | 459,062 |
def replace_symbols(x): r""" A map from open_symbol to '(' and close_symbol to ')' and otherwise an error is raised. EXAMPLES:: sage: from sage.combinat.dyck_word import replace_symbols sage: replace_symbols(1) '(' sage: replace_symbols(0) ')' sage: replace_symbols(3) Traceback (most recent call last): ... ValueError... | def replace_symbols(x): r""" A map from ``open_symbol`` to ``'('`` and ``close_symbol`` to ``')'`` and otherwise an error is raised. The values of the constants ``open_symbol`` and ``close_symbol`` are subject to change. This is the inverse map of :func:`replace_parens`. INPUT: - ``x`` -- either ``open_symbol`` or ``... | 459,063 |
def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyck... | def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete. EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyc... | 459,064 |
def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyck... | def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyck... | 459,065 |
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | 459,066 |
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | 459,067 |
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | 459,068 |
def to_noncrossing_partition(self): r""" Bijection of Biane from Dyck words to non crossing partitions Thanks to Mathieu Dutour for describing the bijection. EXAMPLES:: sage: DyckWord([]).to_noncrossing_partition() [] sage: DyckWord([1, 0]).to_noncrossing_partition() [[1]] sage: DyckWord([1, 1, 0, 0]).to_noncrossing_... | def to_noncrossing_partition(self): r""" Bijection of Biane from Dyck words to non-crossing partitions. Thanks to Mathieu Dutour for describing the bijection. EXAMPLES:: sage: DyckWord([]).to_noncrossing_partition() [] sage: DyckWord([1, 0]).to_noncrossing_partition() [[1]] sage: DyckWord([1, 1, 0, 0]).to_noncrossing... | 459,069 |
def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word | def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word | 459,070 |
def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word | def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word | 459,071 |
def a_statistic(self): """ Returns the a-statistic for the Dyck word correspond to the area of the Dyck path. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(1,0)` and '0's represent steps in the direction `(0,1)`. The... | def a_statistic(self): """ Returns the a-statistic for the Dyck word corresponding to the area of the Dyck path. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(1,0)` and '0's represent steps in the direction `(0,1)`. ... | 459,072 |
def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(0,1)` and '0's represent steps in the direct... | def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(0,1)` and '0's represent steps in the direct... | 459,073 |
def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(0,1)` and '0's represent steps in the direct... | def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(0,1)` and '0's represent steps in the direct... | 459,074 |
def list(self): """ Returns a list of all the Dyck words with ``k1`` opening and ``k2`` closing parentheses. EXAMPLES:: sage: DyckWords(0).list() [[]] sage: DyckWords(1).list() [[1, 0]] sage: DyckWords(2).list() [[1, 0, 1, 0], [1, 1, 0, 0]] """ return list(self) | def list(self): """ Returns a list of all the Dyck words with ``k1`` opening and ``k2`` closing parentheses. EXAMPLES:: sage: DyckWords(0).list() [[]] sage: DyckWords(1).list() [[1, 0]] sage: DyckWords(2).list() [[1, 0, 1, 0], [1, 1, 0, 0]] """ return list(self) | 459,075 |
def __iter__(self): r""" Returns an iterator for Dyck words with ``k1`` opening and ``k2`` closing parentheses. EXAMPLES:: sage: [ w for w in DyckWords(0) ] [[]] sage: [ w for w in DyckWords(1) ] [[1, 0]] sage: [ w for w in DyckWords(2) ] [[1, 0, 1, 0], [1, 1, 0, 0]] sage: len([ 'x' for _ in DyckWords(5) ]) 42 """ if... | def __iter__(self): r""" Returns an iterator for Dyck words with ``k1`` opening and ``k2`` closing parentheses. EXAMPLES:: sage: [ w for w in DyckWords(0) ] [[]] sage: [ w for w in DyckWords(1) ] [[1, 0]] sage: [ w for w in DyckWords(2) ] [[1, 0, 1, 0], [1, 1, 0, 0]] sage: len([ 'x' for _ in DyckWords(5) ]) 42 """ if... | 459,076 |
def from_noncrossing_partition(ncp): r""" converts a non-crossing partition to a Dyck word TESTS:: sage: DyckWord(noncrossing_partition=[[1,2]]) # indirect doctest [1, 1, 0, 0] sage: DyckWord(noncrossing_partition=[[1],[2]]) [1, 0, 1, 0] :: sage: dws = DyckWords(5).list() sage: ncps = map( lambda x: x.to_noncrossin... | def from_noncrossing_partition(ncp): r""" Converts a non-crossing partition to a Dyck word. TESTS:: sage: DyckWord(noncrossing_partition=[[1,2]]) # indirect doctest [1, 1, 0, 0] sage: DyckWord(noncrossing_partition=[[1],[2]]) [1, 0, 1, 0] :: sage: dws = DyckWords(5).list() sage: ncps = map( lambda x: x.to_noncrossi... | 459,077 |
def is_Gamma0_equivalent(self, other, N, Transformation=False): r""" Checks if cusps ``self`` and ``other`` are `\Gamma_0(N)`- equivalent. | def is_Gamma0_equivalent(self, other, N, Transformation=False): r""" Checks if cusps ``self`` and ``other`` are `\Gamma_0(N)`- equivalent. | 459,078 |
def gale_ryser_theorem(p1, p2, algorithm="ryser"): r""" Returns the binary matrix given by the Gale-Ryser theorem. The Gale Ryser theorem asserts that if `p_1,p_2` are two partitions of `n` of respective lengths `k_1,k_2`, then there is a binary `k_1\times k_2` matrix `M` such that `p_1` is the vector of row sums and ... | def gale_ryser_theorem(p1, p2, algorithm="ryser"): r""" Returns the binary matrix given by the Gale-Ryser theorem. The Gale Ryser theorem asserts that if `p_1,p_2` are two partitions of `n` of respective lengths `k_1,k_2`, then there is a binary `k_1\times k_2` matrix `M` such that `p_1` is the vector of row sums and ... | 459,079 |
def gale_ryser_theorem(p1, p2, algorithm="ryser"): r""" Returns the binary matrix given by the Gale-Ryser theorem. The Gale Ryser theorem asserts that if `p_1,p_2` are two partitions of `n` of respective lengths `k_1,k_2`, then there is a binary `k_1\times k_2` matrix `M` such that `p_1` is the vector of row sums and ... | def gale_ryser_theorem(p1, p2, algorithm="ryser"): r""" Returns the binary matrix given by the Gale-Ryser theorem. The Gale Ryser theorem asserts that if `p_1,p_2` are two partitions of `n` of respective lengths `k_1,k_2`, then there is a binary `k_1\times k_2` matrix `M` such that `p_1` is the vector of row sums and ... | 459,080 |
def desolve(de, dvar, ics=None, ivar=None, show_method=False, contrib_ode=False): r""" Solves a 1st or 2nd order linear ODE via maxima. Including IVP and BVP. *Use* ``desolve? <tab>`` *if the output in truncated in notebook.* INPUT: - ``de`` - an expression or equation representing the ODE - ``dvar`` - the dependen... | def desolve(de, dvar, ics=None, ivar=None, show_method=False, contrib_ode=False): r""" Solves a 1st or 2nd order linear ODE via maxima. Including IVP and BVP. *Use* ``desolve? <tab>`` *if the output in truncated in notebook.* INPUT: - ``de`` - an expression or equation representing the ODE - ``dvar`` - the dependen... | 459,081 |
def ChainPoset(self, n): """ Returns a chain (a totally ordered poset) containing ``n`` elements. | def ChainPoset(self, n): """ Returns a chain (a totally ordered poset) containing ``n`` elements. | 459,082 |
def ChainPoset(self, n): """ Returns a chain (a totally ordered poset) containing ``n`` elements. | def ChainPoset(self, n): """ Returns a chain (a totally ordered poset) containing ``n`` elements. | 459,083 |
def AntichainPoset(self, n): """ Returns an antichain (a poset with no comparable elements) containing ``n`` elements. | def AntichainPoset(self, n): """ Returns an antichain (a poset with no comparable elements) containing ``n`` elements. | 459,084 |
def AntichainPoset(self, n): """ Returns an antichain (a poset with no comparable elements) containing ``n`` elements. | def AntichainPoset(self, n): """ Returns an antichain (a poset with no comparable elements) containing ``n`` elements. | 459,085 |
def __init__(self, base_ring, name="x", sparse=False, element_class=None, implementation=None): """ TESTS: sage: from sage.rings.polynomial.polynomial_ring import PolynomialRing_field as PRing sage: R = PRing(QQ, 'x'); R Univariate Polynomial Ring in x over Rational Field sage: type(R.gen()) <class 'sage.rings.polynomi... | def __init__(self, base_ring, name="x", sparse=False, element_class=None, implementation=None): """ TESTS: sage: from sage.rings.polynomial.polynomial_ring import PolynomialRing_field as PRing sage: R = PRing(QQ, 'x'); R Univariate Polynomial Ring in x over Rational Field sage: type(R.gen()) <class 'sage.rings.polynomi... | 459,086 |
def __call__(self, P): r""" Returns a rational point P in the abstract Homset J(K), given: 0. A point P in J = Jac(C), returning P; 1. A point P on the curve C such that J = Jac(C), where C is an odd degree model, returning [P - oo]; 2. A pair of points (P, Q) on the curve C such that J = Jac(C), returning [P-Q]; 2. A... | def __call__(self, P): r""" Returns a rational point P in the abstract Homset J(K), given: 0. A point P in J = Jac(C), returning P; 1. A point P on the curve C such that J = Jac(C), where C is an odd degree model, returning [P - oo]; 2. A pair of points (P, Q) on the curve C such that J = Jac(C), returning [P-Q]; 2. A... | 459,087 |
def star_generator_indices(self): r""" Return indices of generating cones of the "ambient fan" containing ``self``. | def star_generator_indices(self): r""" Return indices of generating cones of the "ambient fan" containing ``self``. | 459,088 |
def NumberField(polynomial, name=None, check=True, names=None, cache=True, embedding=None, latex_name=None): r""" Return *the* number field defined by the given irreducible polynomial and with variable with the given name. If check is True (the default), also verify that the defining polynomial is irreducible and over ... | def NumberField(polynomial, name=None, check=True, names=None, cache=True, embedding=None, latex_name=None): r""" Return *the* number field defined by the given irreducible polynomial and with variable with the given name. If check is True (the default), also verify that the defining polynomial is irreducible and over ... | 459,089 |
def NumberField(polynomial, name=None, check=True, names=None, cache=True, embedding=None, latex_name=None): r""" Return *the* number field defined by the given irreducible polynomial and with variable with the given name. If check is True (the default), also verify that the defining polynomial is irreducible and over ... | def NumberField(polynomial, name=None, check=True, names=None, cache=True, embedding=None, latex_name=None): r""" Return *the* number field defined by the given irreducible polynomial and with variable with the given name. If check is True (the default), also verify that the defining polynomial is irreducible and over ... | 459,090 |
def __init__(self, polynomial, name=None, check=True, embedding=None, latex_name=None): """ Create a quadratic number field. EXAMPLES:: sage: k.<a> = QuadraticField(5, check=False); k Number Field in a with defining polynomial x^2 - 5 Don't do this:: sage: k.<a> = QuadraticField(4, check=False); k Number Field in a... | def __init__(self, polynomial, name=None, latex_name=None, check=True, embedding=None): """ Create a quadratic number field. EXAMPLES:: sage: k.<a> = QuadraticField(5, check=False); k Number Field in a with defining polynomial x^2 - 5 Don't do this:: sage: k.<a> = QuadraticField(4, check=False); k Number Field in a... | 459,091 |
def __init__(self, x, y, r1, r2, angle, options): """ Initializes base class Ellipse. | def __init__(self, x, y, r1, r2, angle, options): """ Initializes base class Ellipse. | 459,092 |
def get_minmax_data(self): """ Returns a dictionary with the bounding box data. | def get_minmax_data(self): """ Returns a dictionary with the bounding box data. | 459,093 |
def get_minmax_data(self): """ Returns a dictionary with the bounding box data. | def get_minmax_data(self): """ Returns a dictionary with the bounding box data. | 459,094 |
def get_minmax_data(self): """ Returns a dictionary with the bounding box data. | def get_minmax_data(self): """ Returns a dictionary with the bounding box data. | 459,095 |
def _allowed_options(self): """ Return the allowed options for the Ellipse class. | def _allowed_options(self): """ Return the allowed options for the Ellipse class. | 459,096 |
def _repr_(self): """ String representation of Ellipse primitive. | def _repr_(self): """ String representation of Ellipse primitive. | 459,097 |
def plot3d(self): r""" Plot 3d is not implemented. | def plot3d(self): r""" Plot 3d is not implemented. | 459,098 |
def eval(self, Vobj): r""" Evaluates the left hand side `A\vec{x}+b` on the given vertex/ray/line. NOTES: * Evaluating on a vertex returns `A\vec{x}+b` * Evaluating on a ray returns `A\vec{r}`. Only the sign or whether it is zero is meaningful. * Evaluating on a line returns `A\vec{l}`. Only whether it is zero or not... | def eval(self, Vobj): r""" Evaluates the left hand side `A\vec{x}+b` on the given vertex/ray/line. NOTES: * Evaluating on a vertex returns `A\vec{x}+b` * Evaluating on a ray returns `A\vec{r}`. Only the sign or whether it is zero is meaningful. * Evaluating on a line returns `A\vec{l}`. Only whether it is zero or not... | 459,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.