bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def is_ray(self): """ Tests if this object is a ray. Always True by construction. | def is_ray(self): """ Tests if this object is a ray. Always True by construction. | 472,600 |
def is_line(self): """ Tests if the object is a line. By construction it must be. | def is_line(self): """ Tests if the object is a line. By construction it must be. | 472,601 |
def identity(self): """ Returns the identity projection. | def identity(self): """ Returns the identity projection. | 472,602 |
def identity(self): """ Returns the identity projection. | def identity(self): """ Returns the identity projection. | 472,603 |
def factorial(n, algorithm='gmp'): r""" Compute the factorial of `n`, which is the product `1\cdot 2\cdot 3 \cdots (n-1)\cdot n`. INPUT: - ``n`` - an integer - ``algorithm`` - string (default: 'gmp') - ``'gmp'`` - use the GMP C-library factorial function - ``'pari'`` - use PARI's factorial function OUTPUT: an... | def factorial(n, algorithm='gmp'): r""" Compute the factorial of `n`, which is the product `1\cdot 2\cdot 3 \cdots (n-1)\cdot n`. INPUT: - ``n`` - an integer - ``algorithm`` - string (default: 'gmp'): - ``'gmp'`` - use the GMP C-library factorial function - ``'pari'`` - use PARI's factorial function OUTPUT: a... | 472,604 |
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 =... | 472,605 |
def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth): 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), (ymin, ym... | def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth): 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), (ymin, ym... | 472,606 |
def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth): 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), (ymin, ym... | def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth): 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), (ymin, ym... | 472,607 |
def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | def equify(f): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify(x*y > 1) (x, y) |... | 472,608 |
def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify(x*y > ... | 472,609 |
def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) -x^2 + 2 sage: equify(x*y > ... | 472,610 |
def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | 472,611 |
def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | 472,612 |
def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | 472,613 |
def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify... | 472,614 |
sage: def f(x,y): return math.exp(x/5)*math.cos(y) | sage: def f(x,y): return math.exp(x/5)*math.cos(y) | 472,615 |
sage: def f(x,y): return math.exp(x/5)*math.cos(y) | sage: def f(x,y): return math.exp(x/5)*math.cos(y) | 472,616 |
sage: def f(x,y): return math.exp(x/5)*math.cos(y) | sage: def f(x,y): return math.exp(x/5)*math.cos(y) | 472,617 |
sage: def f(x,y): return math.exp(x/5)*math.cos(y) | sage: def f(x,y): return math.exp(x/5)*math.cos(y) | 472,618 |
def __init__(self, indep_var, dep_vars): """ INPUT: | def __init__(self, indep_var, dep_vars): """ INPUT: | 472,619 |
def __init__(self, indep_var, dep_vars): """ INPUT: | def __init__(self, indep_var, dep_vars): """ INPUT: | 472,620 |
def __init__(self, indep_var, dep_vars): """ INPUT: | def __init__(self, indep_var, dep_vars): """ INPUT: | 472,621 |
def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | def to_cartesian(self, func, params=None): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | 472,622 |
def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | 472,623 |
def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | 472,624 |
def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | 472,625 |
def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | 472,626 |
def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | 472,627 |
def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | def to_cartesian(self, func, params): """ Returns a 3-tuple of functions, parameterized over ``params``, that represents the cartesian coordinates of the value of ``func``. | 472,628 |
def subs_func(t): return lambda x,y: t.subs({ indep_var_dummy: func(x, y), dep_var_dummies[0]: x, dep_var_dummies[1]: y }) | def subs_func(t): return lambda x,y: t.subs({ dep_var_dummy: func(x, y), indep_var_dummies[0]: x, indep_var_dummies[1]: y }) | 472,629 |
def subs_func(t): return lambda x,y: t.subs({ indep_var_dummy: func(x, y), dep_var_dummies[0]: x, dep_var_dummies[1]: y }) | def subs_func(t): return lambda x,y: t.subs({ indep_var_dummy: func(x, y), dep_var_dummies[0]: x, dep_var_dummies[1]: y }) | 472,630 |
def __repr__(self): return '%s (%s in terms of %s)' % \ (self._name, self.indep_var, ', '.join(self.dep_vars)) | def __repr__(self): return '%s (%s in terms of %s)' % \ (self._name, self.indep_var, ', '.join(self.dep_vars)) | 472,631 |
def __init__(self, custom_trans, fvar): """ INPUT: | def __init__(self, custom_trans, fvar): """ INPUT: | 472,632 |
def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | 472,633 |
def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | 472,634 |
def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | 472,635 |
def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | 472,636 |
def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | 472,637 |
def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | def gen_transform(self, f=None, u=None, v=None): """ EXAMPLE:: | 472,638 |
def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | 472,639 |
def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | 472,640 |
def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | 472,641 |
def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | 472,642 |
def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | def gen_transform(self, r=None, theta=None, phi=None): """ EXAMPLE:: | 472,643 |
def gen_transform(self, rho=None, phi=None, z=None): """ EXAMPLE:: | def gen_transform(self, rho=None, phi=None, z=None): """ EXAMPLE:: | 472,644 |
def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): """ INPUT: - ``f`` - a symbolic expression or function of 2 variables - ``urange`` - a 2-tuple (u_min, u_max) or a 3-tuple (u, u_min, u_max) - ``vrange`` - a 2-tuple (v_min, v_max) or a 3-tuple (v, v_min, v_max) - ``adaptive`` - (defaul... | def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): """ INPUT: - ``f`` - a symbolic expression or function of 2 variables - ``urange`` - a 2-tuple (u_min, u_max) or a 3-tuple (u, u_min, u_max) - ``vrange`` - a 2-tuple (v_min, v_max) or a 3-tuple (v, v_min, v_max) - ``adaptive`` - (defaul... | 472,645 |
def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): """ INPUT: - ``f`` - a symbolic expression or function of 2 variables - ``urange`` - a 2-tuple (u_min, u_max) or a 3-tuple (u, u_min, u_max) - ``vrange`` - a 2-tuple (v_min, v_max) or a 3-tuple (v, v_min, v_max) - ``adaptive`` - (defaul... | def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): """ INPUT: - ``f`` - a symbolic expression or function of 2 variables - ``urange`` - a 2-tuple (u_min, u_max) or a 3-tuple (u, u_min, u_max) - ``vrange`` - a 2-tuple (v_min, v_max) or a 3-tuple (v, v_min, v_max) - ``adaptive`` - (defaul... | 472,646 |
def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): """ INPUT: - ``f`` - a symbolic expression or function of 2 variables - ``urange`` - a 2-tuple (u_min, u_max) or a 3-tuple (u, u_min, u_max) - ``vrange`` - a 2-tuple (v_min, v_max) or a 3-tuple (v, v_min, v_max) - ``adaptive`` - (defaul... | def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): """ INPUT: - ``f`` - a symbolic expression or function of 2 variables - ``urange`` - a 2-tuple (u_min, u_max) or a 3-tuple (u, u_min, u_max) - ``vrange`` - a 2-tuple (v_min, v_max) or a 3-tuple (v, v_min, v_max) - ``adaptive`` - (defaul... | 472,647 |
sage: def _(which_plot=[A,B,C,D,E]): | sage: def _(which_plot=[A,B,C,D,E]): | 472,648 |
sage: def _(which_plot=[F, G, H, I, J]): | sage: def _(which_plot=[F, G, H, I, J]): | 472,649 |
sage: def _(which_plot=[F, G, H, I, J]): | sage: def _(which_plot=[F, G, H, I, J]): | 472,650 |
sage: def _(which_plot=[F, G, H, I, J]): | sage: def _(which_plot=[F, G, H, I, J]): | 472,651 |
def spherical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in spherical coordinates in the domain specified by urange and vrange. This function is equivalent to:: sage: var('r,u,u') sage: T = (r*cos(u)*sin(v), r*sin(u)*sin(v), r*cos(v), r) sage: plot3d(f, urange, vrange, transformation=T) INPU... | def spherical_plot3d(f, urange, vrange, **kwds): """ Plots a function in spherical coordinates. This function is equivalent to:: sage: r,u,v=var('r,u,v') sage: f=u*v; urange=(u,0,pi); vrange=(v,0,pi) sage: T = (r*cos(u)*sin(v), r*sin(u)*sin(v), r*cos(v), [u,v]) sage: plot3d(f, urange, vrange, transformation=T) INPUT... | 472,652 |
def spherical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in spherical coordinates in the domain specified by urange and vrange. This function is equivalent to:: sage: var('r,u,u') sage: T = (r*cos(u)*sin(v), r*sin(u)*sin(v), r*cos(v), r) sage: plot3d(f, urange, vrange, transformation=T) INPU... | def spherical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in spherical coordinates in the domain specified by urange and vrange. This function is equivalent to:: sage: var('r,u,u') sage: T = (r*cos(u)*sin(v), r*sin(u)*sin(v), r*cos(v), r) sage: plot3d(f, urange, vrange, transformation=T) INPU... | 472,653 |
def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | def cylindrical_plot3d(f, urange, vrange, **kwds): """ Plots a function in cylindrical coordinates. This function is equivalent to:: sage: r,u,v=var('r,u,v') sage: f=u*v; urange=(u,0,pi); vrange=(v,0,pi) sage: T = (r*cos(u), r*sin(u), v, [u,v]) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | 472,654 |
def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | 472,655 |
def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | 472,656 |
def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | 472,657 |
def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | def cylindrical_plot3d(f, urange, vrange, **kwds): """ Takes a function and plots it in cylindrical coordinates in the domain specified by urange and vrange. This command is equivalent to:: sage: var('r,u,v') sage: T = (r*cos(u), r*sin(u), v, r) sage: plot3d(f, urange, vrange, transformation=T) INPUT: - ``f`` - a sy... | 472,658 |
def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table `S`. | def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table `S`. | 472,659 |
def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table `S`. | def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table `S`. | 472,660 |
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... | 472,661 |
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... | 472,662 |
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... | 472,663 |
def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - (default: ``None``) two moduli, or ``None``. OUTPUT: If ``m... | 472,664 |
def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not ``None... | 472,665 |
def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | 472,666 |
def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | 472,667 |
def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | 472,668 |
def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, ... | 472,669 |
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 ... | 472,670 |
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 ... | 472,671 |
def selmer_group(self, S, m, proof=True): """ Compute the Selmer group `K(S,m)`, which is defined to be the subgroup of `K^\times/(K^\times)^m` consisting of elements `a` such that `K(\sqrt[m]{a})/K` is unramified at all primes of `K` lying above a place outside of `S`. | def selmer_group(self, S, m, proof=True): r""" Compute the Selmer group `K(S,m)`, which is defined to be the subgroup of `K^\times/(K^\times)^m` consisting of elements `a` such that `K(\sqrt[m]{a})/K` is unramified at all primes of `K` lying above a place outside of `S`. | 472,672 |
def _call_(self, x): r""" TEST:: | def _call_(self, x): r""" TEST:: | 472,673 |
def _discrete_log(self,x): # EVEN DUMBER IMPLEMENTATION! u = [y for y in self.list() if y.element() == x] if len(u) == 0: raise TypeError, "Not in group" if len(u) > 1: raise NotImplementedError return u[0] | def _discrete_log(self,x): # EVEN DUMBER IMPLEMENTATION! u = [y for y in self.list() if y.element() == x] if len(u) == 0: raise TypeError, "Not in group" if len(u) > 1: raise NotImplementedError return u[0] | 472,674 |
def edge_cut(self, s, t, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns a minimum edge cut between vertices `s` and `t` represented by a list of edges. | def edge_cut(self, s, t, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns a minimum edge cut between vertices `s` and `t` represented by a list of edges. | 472,675 |
def _sage_(self, R=None): """ Coerces self to Sage. | def _sage_(self, R=None): """ Coerces self to Sage. | 472,676 |
def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (\`$ or \$`), because o... | 472,677 |
def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | 472,678 |
def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | 472,679 |
def process_mathtt(s, embedded=False): r"""nodetex Replace \mathtt{BLAH} with either \verb|BLAH| (in the notebook) or BLAH (from the command line). INPUT: - ``s`` - string, in practice a docstring - ``embedded`` - boolean (optional, default False) This function is called by :func:`format`, and if in the notebook, it... | def process_mathtt(s, embedded=False): r"""nodetex Replace \\mathtt{BLAH} with either \\verb|BLAH| (in the notebook) or BLAH (from the command line). INPUT: - ``s`` - string, in practice a docstring - ``embedded`` - boolean (optional, default False) This function is called by :func:`format`, and if in the notebook, ... | 472,680 |
def run(self, category = None, skip = [], catch = True, raise_on_failure = False, **options): """ Run all the tests from this test suite: | def run(self, category = None, skip = [], catch = True, raise_on_failure = False, **options): """ Run all the tests from this test suite: | 472,681 |
def run(self, category = None, skip = [], catch = True, raise_on_failure = False, **options): """ Run all the tests from this test suite: | def run(self, category = None, skip = [], catch = True, raise_on_failure = False, **options): """ Run all the tests from this test suite: | 472,682 |
def instance_tester(instance, tester = None, **options): """ Returns a gadget attached to ``instance`` providing testing utilities. EXAMPLES:: sage: from sage.misc.sage_unittest import instance_tester sage: tester = instance_tester(ZZ) sage: tester.assert_(1 == 1) sage: tester.assert_(1 == 0) Traceback (most recent ... | def instance_tester(instance, tester = None, **options): """ Returns a gadget attached to ``instance`` providing testing utilities. EXAMPLES:: sage: from sage.misc.sage_unittest import instance_tester sage: tester = instance_tester(ZZ) sage: tester.assert_(1 == 1) sage: tester.assert_(1 == 0) Traceback (most recent ... | 472,683 |
def __init__(self, instance, elements = None, verbose = False, prefix = "", **options): """ A gadget attached to an instance providing it with testing utilities. | def __init__(self, instance, elements = None, verbose = False, prefix = "", **options): """ A gadget attached to an instance providing it with testing utilities. | 472,684 |
def matrix(*args, **kwds): """ Create a matrix. INPUT: The matrix command takes the entries of a matrix, optionally preceded by a ring and the dimensions of the matrix, and returns a matrix. The entries of a matrix can be specified as a flat list of elements, a list of lists (i.e., a list of rows), a list of Sage vec... | def matrix(*args, **kwds): """ Create a matrix. INPUT: The matrix command takes the entries of a matrix, optionally preceded by a ring and the dimensions of the matrix, and returns a matrix. The entries of a matrix can be specified as a flat list of elements, a list of lists (i.e., a list of rows), a list of Sage vec... | 472,685 |
def check_types(self, *a, **kw): if self._check_types is None: out = check_types(*a, **kw) self._check_types = _pik.dumps(out) else: out = copy.deepcopy(_pik.loads(self._check_types)) return out | def check_types(self, *a, **kw): if self._check_types is None: out = check_types(*a, **kw) self._check_types = _pik.dumps(out) else: out = copy.deepcopy(_pik.loads(self._check_types)) return out | 472,686 |
def check_ieee_macros(self, *a, **kw): if self._check_ieee_macros is None: out = check_ieee_macros(*a, **kw) self._check_ieee_macros = _pik.dumps(out) else: out = copy.deepcopy(_pik.loads(self._check_ieee_macros)) return out | def check_ieee_macros(self, *a, **kw): if self._check_ieee_macros is None: out = check_ieee_macros(*a, **kw) self._check_ieee_macros = _pik.dumps(out) else: out = copy.deepcopy(_pik.loads(self._check_ieee_macros)) return out | 472,687 |
def is_npy_no_smp(): """Return True if the NPY_NO_SMP symbol must be defined in public header (when SMP support cannot be reliably enabled).""" # Python 2.3 causes a segfault when # trying to re-acquire the thread-state # which is done in error-handling # ufunc code. NPY_ALLOW_C_API and friends # cause the segfaul... | def is_npy_no_smp(): """Return True if the NPY_NO_SMP symbol must be defined in public header (when SMP support cannot be reliably enabled).""" # Python 2.3 causes a segfault when # trying to re-acquire the thread-state # which is done in error-handling # ufunc code. NPY_ALLOW_C_API and friends # cause the segfaul... | 472,688 |
def check_prec(prec): flist = [f + prec for f in C99_COMPLEX_FUNCS] decl = dict([(f, True) for f in flist]) if not config.check_funcs_once(flist, call=decl, decl=decl, libraries=mathlibs): for f in flist: if config.check_func(f, call=True, decl=True, libraries=mathlibs): priv.append(fname2def(f)) else: priv.extend([fna... | def check_prec(prec): flist = [f + prec for f in C99_COMPLEX_FUNCS] decl = dict([(f, True) for f in flist]) if not config.check_funcs_once(flist, call=decl, decl=decl, libraries=mathlibs): for f in flist: if config.check_func(f, call=True, decl=True, libraries=mathlibs): priv.append(fname2def(f)) else: priv.extend([fna... | 472,689 |
def _is_a(self, x): """ Check if a sage object belongs to self. This methods is a helper for :meth:`__contains__` and the constructor :meth:`_element_constructor_`. | def _is_a(self, x): """ Check if a Sage object belongs to self. This methods is a helper for :meth:`__contains__` and the constructor :meth:`_element_constructor_`. | 472,690 |
def __init__(self, script_subdirectory=None, logfile=None, server=None, init_code = None): """ Create an instance of the Maxima interpreter. | def __init__(self, script_subdirectory=None, logfile=None, server=None, init_code = None): """ Create an instance of the Maxima interpreter. | 472,691 |
def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | 472,692 |
def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | 472,693 |
def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | 472,694 |
def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | 472,695 |
def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: | 472,696 |
def _command_runner(self, command, s, redirect=True): """ Run ``command`` in a new Maxima session and return its output as an ``AsciiArtString``. | def _command_runner(self, command, s, redirect=True): """ Run ``command`` in a new Maxima session and return its output as an ``AsciiArtString``. | 472,697 |
def _command_runner(self, command, s, redirect=True): """ Run ``command`` in a new Maxima session and return its output as an ``AsciiArtString``. | def _command_runner(self, command, s, redirect=True): """ Run ``command`` in a new Maxima session and return its output as an ``AsciiArtString``. | 472,698 |
def version(self): """ Return the version of Maxima that Sage includes. | def version(self): """ Return the version of Maxima that Sage includes. | 472,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.