rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
l = list(l) if (not len(l) == n or not all(isinstance(a, (int,Integer)) for a in l)): | arg = list(arg) if (not len(arg) == n or not all(isinstance(a, (int,Integer)) for a in arg)): | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 932f02519b456e87f5bab82bef45c62d52dc3efe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/932f02519b456e87f5bab82bef45c62d52dc3efe/words.py |
"l (=%s) must be an iterable of %s integers" %(l, n)) compositions = [l] | "arg (=%s) must be an iterable of %s integers" %(arg, n)) compositions = [arg] | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 932f02519b456e87f5bab82bef45c62d52dc3efe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/932f02519b456e87f5bab82bef45c62d52dc3efe/words.py |
sage: cmp(c1, 1) | sage: cmp(c1, 1) * cmp(1, c1) | def __cmp__(self, right): r""" Compare ``self`` and ``right``. INPUT: - ``right`` -- anything. OUTPUT: - 0 if ``right`` is of the same type as ``self`` and their rays are the same and listed in the same order. 1 or -1 otherwise. TESTS:: sage: c1 = Cone([(1,0), (0,1)]) sage: c2 = Cone([(0,1), (1,0)]) sage: c3 = Co... | 14127554227289c36ed2f39b8378016311cf0546 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/14127554227289c36ed2f39b8378016311cf0546/cone.py |
def eval(self, command, **kwds): | def eval(self, command, *args, **kwds): | def eval(self, command, **kwds): """ Evaluates commands. | efd6c7d0717f8a54dd0d13724971fcddaea2597c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/efd6c7d0717f8a54dd0d13724971fcddaea2597c/scilab.py |
'scilab-5.0...' | 'scilab-...' | def version(self): """ Returns the version of the Scilab software used. | efd6c7d0717f8a54dd0d13724971fcddaea2597c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/efd6c7d0717f8a54dd0d13724971fcddaea2597c/scilab.py |
sage: G = matrix(GF(2),[[1,0,0],[1,1,0]]) sage: C = LinearCode(G) sage: C.dimension() 2 | sage: G = matrix(GF(2),[[1,0,0],[1,1,0]]) sage: C = LinearCode(G) sage: C.dimension() 2 | def dimension(self): r""" Returns the dimension of this code. EXAMPLES:: sage: G = matrix(GF(2),[[1,0,0],[1,1,0]]) sage: C = LinearCode(G) sage: C.dimension() 2 """ return self.__dim | 8ac5bad415decbd22c9c8558df047eb1ad70bd3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8ac5bad415decbd22c9c8558df047eb1ad70bd3b/linear_code.py |
Returns the Duursama data `v` and `m` of this formally s.d. code `C` | Returns the Duursma data `v` and `m` of this formally s.d. code `C` | def sd_duursma_data(C, i): r""" Returns the Duursama data `v` and `m` of this formally s.d. code `C` and the type number `i` in (1,2,3,4). Does *not* check if this code is actually sd. INPUT: - ``i`` - Type number OUTPUT: - Pair ``(v, m)`` as in Duursama [D]_ REFERENCES: - [D] - I. Duursma, "Extremal weight enum... | 8ac5bad415decbd22c9c8558df047eb1ad70bd3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8ac5bad415decbd22c9c8558df047eb1ad70bd3b/linear_code.py |
- Pair ``(v, m)`` as in Duursama [D]_ | - Pair ``(v, m)`` as in Duursma [D]_ | def sd_duursma_data(C, i): r""" Returns the Duursama data `v` and `m` of this formally s.d. code `C` and the type number `i` in (1,2,3,4). Does *not* check if this code is actually sd. INPUT: - ``i`` - Type number OUTPUT: - Pair ``(v, m)`` as in Duursama [D]_ REFERENCES: - [D] - I. Duursma, "Extremal weight enum... | 8ac5bad415decbd22c9c8558df047eb1ad70bd3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8ac5bad415decbd22c9c8558df047eb1ad70bd3b/linear_code.py |
- [D] - I. Duursma, "Extremal weight enumerators and ultraspherical polynomials" | .. [D] I. Duursma, "Extremal weight enumerators and ultraspherical polynomials" | def sd_duursma_data(C, i): r""" Returns the Duursama data `v` and `m` of this formally s.d. code `C` and the type number `i` in (1,2,3,4). Does *not* check if this code is actually sd. INPUT: - ``i`` - Type number OUTPUT: - Pair ``(v, m)`` as in Duursama [D]_ REFERENCES: - [D] - I. Duursma, "Extremal weight enum... | 8ac5bad415decbd22c9c8558df047eb1ad70bd3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8ac5bad415decbd22c9c8558df047eb1ad70bd3b/linear_code.py |
- Coefficients `q_0, q_1, ...` of `q(T)` as in Duursama [D]_ | - Coefficients `q_0, q_1, ...` of `q(T)` as in Duursma [D]_ | def sd_duursma_q(C,i,d0): r""" INPUT: - ``C`` - sd code; does *not* check if `C` is actually an sd code - ``i`` - Type number, one of 1,2,3,4 - ``d0`` - Divisor, the smallest integer such that each `A_i > 0` iff `i` is divisible by `d0` OUTPUT: - Coefficients `q_0, q_1, ...` of `q(T)` as in Duursama [D]_ REFEREN... | 8ac5bad415decbd22c9c8558df047eb1ad70bd3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8ac5bad415decbd22c9c8558df047eb1ad70bd3b/linear_code.py |
""" | r""" | def strip_answer(self, s): """ Returns the string s with Matlab's answer prompt removed. EXAMPLES:: sage: s = '\nans =\n\n 2\n' sage: matlab.strip_answer(s) ' 2' """ i = s.find('=') return s[i+1:].strip('\n') | e9a5741f8767b957063a1cb1f22102c3fe186088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e9a5741f8767b957063a1cb1f22102c3fe186088/matlab.py |
img = self(letter) | img = self.image(letter) | def is_identity(self): r""" Returns ``True`` if ``self`` is the identity morphism. EXAMPLES:: | a051baff3ff3349040e2463711e0ebf4c62b96f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a051baff3ff3349040e2463711e0ebf4c62b96f9/morphism.py |
def random_element(self, prec, bound=None): | def random_element(self, prec=None, *args, **kwds): | def random_element(self, prec, bound=None): r""" Return a random power series. INPUT: - ``prec`` - an integer - ``bound`` - an integer (default: None, which tries to spread choice across ring, if implemented) OUTPUT: - ``power series`` - a power series such that the coefficient of `x^i`, for `i` up to ``degr... | 168bd147cb010ecdedcd71826bdf5a844078a49e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/168bd147cb010ecdedcd71826bdf5a844078a49e/power_series_ring.py |
def random_element(self, prec, bound=None): r""" Return a random power series. INPUT: - ``prec`` - an integer - ``bound`` - an integer (default: None, which tries to spread choice across ring, if implemented) OUTPUT: - ``power series`` - a power series such that the coefficient of `x^i`, for `i` up to ``degr... | 168bd147cb010ecdedcd71826bdf5a844078a49e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/168bd147cb010ecdedcd71826bdf5a844078a49e/power_series_ring.py | ||
- ``prec`` - an integer - ``bound`` - an integer (default: None, which tries to spread choice across ring, if implemented) | - ``prec`` - Integer specifying precision of output (default: default precision of self) - ``*args, **kwds`` - Passed on to the ``random_element`` method for the base ring | def random_element(self, prec, bound=None): r""" Return a random power series. INPUT: - ``prec`` - an integer - ``bound`` - an integer (default: None, which tries to spread choice across ring, if implemented) OUTPUT: - ``power series`` - a power series such that the coefficient of `x^i`, for `i` up to ``degr... | 168bd147cb010ecdedcd71826bdf5a844078a49e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/168bd147cb010ecdedcd71826bdf5a844078a49e/power_series_ring.py |
- ``power series`` - a power series such that the coefficient of `x^i`, for `i` up to ``degree``, are coercions to the base ring of random integers between -``bound`` and ``bound``. IMPLEMENTATION: Call the random_element method on the underlying | - Power series with precision ``prec`` whose coefficients are random elements from the base ring, randomized subject to the arguments ``*args`` and ``**kwds`` IMPLEMENTATION:: Call the ``random_element`` method on the underlying | def random_element(self, prec, bound=None): r""" Return a random power series. INPUT: - ``prec`` - an integer - ``bound`` - an integer (default: None, which tries to spread choice across ring, if implemented) OUTPUT: - ``power series`` - a power series such that the coefficient of `x^i`, for `i` up to ``degr... | 168bd147cb010ecdedcd71826bdf5a844078a49e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/168bd147cb010ecdedcd71826bdf5a844078a49e/power_series_ring.py |
sage: R.random_element(5) | sage: R.random_element(5) | def random_element(self, prec, bound=None): r""" Return a random power series. INPUT: - ``prec`` - an integer - ``bound`` - an integer (default: None, which tries to spread choice across ring, if implemented) OUTPUT: - ``power series`` - a power series such that the coefficient of `x^i`, for `i` up to ``degr... | 168bd147cb010ecdedcd71826bdf5a844078a49e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/168bd147cb010ecdedcd71826bdf5a844078a49e/power_series_ring.py |
sage: R.random_element(5,20) 1/15 + 19/17*t + 10/3*t^2 + 5/2*t^3 + 1/2*t^4 + O(t^5) """ return self(self.__poly_ring.random_element(prec, bound), prec) | sage: R.random_element(10) -1/2 + 2*t - 2/7*t^2 - 25*t^3 - t^4 + 2*t^5 - 4*t^7 - 1/3*t^8 - t^9 + O(t^10) If given no argument, random_element uses default precision of self:: sage: T = PowerSeriesRing(ZZ,'t') sage: T.default_prec() 20 sage: T.random_element() 4 + 2*t - t^2 - t^3 + 2*t^4 + t^5 + t^6 - 2*t^7 - t^8 - t^... | def random_element(self, prec, bound=None): r""" Return a random power series. INPUT: - ``prec`` - an integer - ``bound`` - an integer (default: None, which tries to spread choice across ring, if implemented) OUTPUT: - ``power series`` - a power series such that the coefficient of `x^i`, for `i` up to ``degr... | 168bd147cb010ecdedcd71826bdf5a844078a49e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/168bd147cb010ecdedcd71826bdf5a844078a49e/power_series_ring.py |
- ``solution_dict`` - bool (default: False); if True, return a list of dictionaries containing the solutions. | - ``solution_dict`` - bool (default: False); if True or non-zero, return a list of dictionaries containing the solutions. If there are no solutions, return an empty list (rather than a list containing an empty dictionary). Likewise, if there's only a single solution, return a list containing one dictionary with that s... | 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. - ... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py |
If we ask for a dictionary for the solutions, we get it:: | If we ask for dictionaries containing the solutions, we get them:: | 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. - ... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py |
TESTS:: sage: solve([sin(x)==x,y^2==x],x,y) [sin(x) == x, y^2 == x] | 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. - ... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py | |
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,solut... | 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. - ... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py | |
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. - ... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py | ||
if 'solution_dict' in kwds and kwds['solution_dict']==True: | if kwds.get('solution_dict', False): if len(sol_list)==0: return [] | 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. - ... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py |
- ``solution_dict`` - (default: False) if True, return a list of dictionaries containing the solutions. | - ``solution_dict`` - bool (default: False); if True or non-zero, return a list of dictionaries containing the solutions. If there are no solutions, return an empty list (rather than a list containing an empty dictionary). Likewise, if there's only a single solution, return a list containing one dictionary with that s... | 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... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py |
We solve an simple equation modulo 2:: | We solve a simple equation modulo 2:: | 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... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py |
raise ValueError, "the modulus must be a positive integer" | raise ValueError, "the modulus must be a positive integer" | 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... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py |
if solution_dict == True: | if solution_dict: | 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... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py |
We solve an simple equation modulo 2:: | We solve a simple equation modulo 2:: | 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... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py |
raise ValueError, "the modulus must be a positive integer" | raise ValueError, "the modulus must be a positive integer" | 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... | 0514bac4c2d7c6b97d01cba8018101be1b18547a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0514bac4c2d7c6b97d01cba8018101be1b18547a/relation.py |
AUTHORS: - Robert Bradshaw (2007-10): numerical algorithm - Robert Bradshaw (2008-10): algebraic algorithm | def minpoly(ex, var='x', algorithm=None, bits=None, degree=None, epsilon=0): r""" Return the minimal polynomial of self, if possible. INPUT: - ``var`` - polynomial variable name (default 'x') - ``algorithm`` - 'algebraic' or 'numerical' (default both, but with numerical first) - ``bits`` - the number of bits to ... | 86e87880bfb86915da047327d5455d1e0168d6ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/86e87880bfb86915da047327d5455d1e0168d6ef/calculus.py | |
AUTHORS: - Golam Mortuza Hossain (2009-06-15) | def _limit_latex_(self, f, x, a): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f = function('f',x) sage: _limit_latex_(0, f, x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' sage: latex(limit(f, x=oo)) \lim_... | 86e87880bfb86915da047327d5455d1e0168d6ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/86e87880bfb86915da047327d5455d1e0168d6ef/calculus.py | |
AUTHORS: - Golam Mortuza Hossain (2009-06-22) | def _laplace_latex_(self, *args): r""" Return LaTeX expression for Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _laplace_latex_ sage: var('s,t') (s, t) sage: f = function('f',t) sage: _laplace_latex_(0,f,t,s) '\\mathcal{L}\\left(f\\left(t\\right), t, s\\right)' sage: l... | 86e87880bfb86915da047327d5455d1e0168d6ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/86e87880bfb86915da047327d5455d1e0168d6ef/calculus.py | |
AUTHORS: - Golam Mortuza Hossain (2009-06-22) | def _inverse_laplace_latex_(self, *args): r""" Return LaTeX expression for inverse Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _inverse_laplace_latex_ sage: var('s,t') (s, t) sage: F = function('F',s) sage: _inverse_laplace_latex_(0,F,s,t) '\\mathcal{L}^{-1}\\left(F\\... | 86e87880bfb86915da047327d5455d1e0168d6ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/86e87880bfb86915da047327d5455d1e0168d6ef/calculus.py | |
gens = [ "()" ] | k = max(self.entries()) gens = [range(1,k+1)] | def row_stabilizer(self): """ Return the PermutationGroup corresponding to the row stabilizer of self. EXAMPLES:: sage: rs = Tableau([[1,2,3],[4,5]]).row_stabilizer() sage: rs.order() == factorial(3)*factorial(2) True sage: PermutationGroupElement([(1,3,2),(4,5)]) in rs True sage: PermutationGroupElement([(1,4)]) in ... | d1a8bb7da95c4f8a309323a5bdf498d536831868 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d1a8bb7da95c4f8a309323a5bdf498d536831868/tableau.py |
sage: homchain(C2, generators=True, base_ring=GF(2))[2] | sage: homchain(C2, generators=True, base_ring=GF(2))[2] | def homchain(complex=None, **kwds): r""" Compute the homology of a chain complex using the CHomP program ``homchain``. :param complex: a chain complex :param generators: if True, also return list of generators :type generators: boolean; optional, default False :param verbose: if True, print helpful messages as the com... | 84010535db6dc898dca8dbb68d1f41dd9e0c30d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/84010535db6dc898dca8dbb68d1f41dd9e0c30d4/chomp.py |
This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S NOTE: This function assumes S is a list of prime ideals, it does not check this. This function will fail if S is not a list of prime ideals. | Return the part of this fractional ideal which is coprime to the prime ideals in the list ``S``. .. note:: This function assumes that `S` is a list of prime ideals, but does not check this. This function will fail if `S` is not a list of prime ideals. | def prime_to_S_part(self,S): r""" This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S NOTE: This function assumes S is a list of prime ideals, it does not check this. This function will fail if S is not a list of prime ideals. INPUT: - "self" - fractional ide... | 6227df91d1b5dd35f4012cf80c2dec37f6aa4d01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6227df91d1b5dd35f4012cf80c2dec37f6aa4d01/number_field_ideal.py |
- "self" - fractional ideal - "S" - a list of prime ideals | - `S` - a list of prime ideals | def prime_to_S_part(self,S): r""" This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S NOTE: This function assumes S is a list of prime ideals, it does not check this. This function will fail if S is not a list of prime ideals. INPUT: - "self" - fractional ide... | 6227df91d1b5dd35f4012cf80c2dec37f6aa4d01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6227df91d1b5dd35f4012cf80c2dec37f6aa4d01/number_field_ideal.py |
- an ideal coprime to the ideals in S | A fractional ideal coprime to the primes in `S`, whose prime factorization is that of ``self`` withe the primes in `S` removed. | def prime_to_S_part(self,S): r""" This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S NOTE: This function assumes S is a list of prime ideals, it does not check this. This function will fail if S is not a list of prime ideals. INPUT: - "self" - fractional ide... | 6227df91d1b5dd35f4012cf80c2dec37f6aa4d01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6227df91d1b5dd35f4012cf80c2dec37f6aa4d01/number_field_ideal.py |
r''' Returns True if the ideal is an unit with respect to the list of primes S. INPUT:: - `S` - a list of prime ideals (not checked if they are indeed prime). OUTPUT:: True, if the ideal is `S`-unit. False, otherwise. | r""" Return True if this fractional ideal is a unit with respect to the list of primes ``S``. INPUT: - `S` - a list of prime ideals (not checked if they are indeed prime). .. note:: This function assumes that `S` is a list of prime ideals, but does not check this. This function will fail if `S` is not a list of pr... | def is_S_unit(self,S): r''' Returns True if the ideal is an unit with respect to the | 6227df91d1b5dd35f4012cf80c2dec37f6aa4d01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6227df91d1b5dd35f4012cf80c2dec37f6aa4d01/number_field_ideal.py |
''' | """ | def is_S_unit(self,S): r''' Returns True if the ideal is an unit with respect to the | 6227df91d1b5dd35f4012cf80c2dec37f6aa4d01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6227df91d1b5dd35f4012cf80c2dec37f6aa4d01/number_field_ideal.py |
r''' Returns True if the ideal is an unit with respect to the list of primes S. INPUT:: - `S` - a list of prime ideals (not checked if they are indeed prime). OUTPUT:: True, if the ideal is `S`-integral. False, otherwise. | r""" Return True if this fractional ideal is integral with respect to the list of primes ``S``. INPUT: - `S` - a list of prime ideals (not checked if they are indeed prime). .. note:: This function assumes that `S` is a list of prime ideals, but does not check this. This function will fail if `S` is not a list of ... | def is_S_integral(self,S): r''' Returns True if the ideal is an unit with respect to the | 6227df91d1b5dd35f4012cf80c2dec37f6aa4d01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6227df91d1b5dd35f4012cf80c2dec37f6aa4d01/number_field_ideal.py |
''' | """ | def is_S_integral(self,S): r''' Returns True if the ideal is an unit with respect to the | 6227df91d1b5dd35f4012cf80c2dec37f6aa4d01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6227df91d1b5dd35f4012cf80c2dec37f6aa4d01/number_field_ideal.py |
- ``algorithm`` - string (default: 'recursive') specifying which algorithm to be used when computing the iterated palindromic closure. It must be one of the two following values: - ``'definition'`` means that the iterated right palindromic closure is computed using the definition. - ``'recursive'`` is based on an eff... | - ``algorithm`` - string (default: ``'recursive'``) specifying which algorithm to be used when computing the iterated palindromic closure. It must be one of the two following values: - ``'definition'`` - computed using the definition - ``'recursive'`` - computation based on an efficient formula that recursively compu... | def iterated_right_palindromic_closure(self, f=None, algorithm='recursive'): r""" Returns the iterated (`f`-)palindromic closure of self. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py |
l = len(sub) | L = len(sub) | def find(self, sub, start=0, end=None): r""" Returns the index of the first occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py |
i = len(self) - l | i = len(self) - L | def find(self, sub, start=0, end=None): r""" Returns the index of the first occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py |
i = start - l | i = start - L | def find(self, sub, start=0, end=None): r""" Returns the index of the first occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py |
if self[i:i+l] == sub: return i | if self[i:i+L] == sub: return i | def find(self, sub, start=0, end=None): r""" Returns the index of the first occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py |
l = len(sub) | L = len(sub) | def rfind(self, sub, start=0, end=None): r""" Returns the index of the last occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py |
i = len(self) - l | i = len(self) - L | def rfind(self, sub, start=0, end=None): r""" Returns the index of the last occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py |
i = end - l | i = end - L | def rfind(self, sub, start=0, end=None): r""" Returns the index of the last occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py |
if self[i:i+l] == sub: return i | if self[i:i+L] == sub: return i | def rfind(self, sub, start=0, end=None): r""" Returns the index of the last occurrence of sub in self, such that sub is contained within self[start:end]. Returns -1 on failure. INPUT: | f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f1dc5cf58b77c7cbd5be67cea6663f26bdaf2e73/word.py |
""" qE = self._q | sage: T = EllipticCurve('14').tate_curve(7) sage: T.E2(30) 2 + 4*7 + 7^2 + 3*7^3 + 6*7^4 + 5*7^5 + 2*7^6 + 7^7 + 5*7^8 + 6*7^9 + 5*7^10 + 2*7^11 + 6*7^12 + 4*7^13 + 3*7^15 + 5*7^16 + 4*7^17 + 4*7^18 + 2*7^20 + 7^21 + 5*7^22 + 4*7^23 + 4*7^24 + 3*7^25 + 6*7^26 + 3*7^27 + 6*7^28 + O(7^30) """ | def E2(self,prec=20): r""" Returns the value of the `p`-adic Eisenstein series of weight 2 evaluated on the elliptic curve having split multiplicative reduction. | 536830f7840799421c89f37f9413bf2f8ea8090b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/536830f7840799421c89f37f9413bf2f8ea8090b/ell_tate_curve.py |
P1 = P[0]; P2 = P[1] | P1 = P[0] P2 = P[1] if is_Integer(P1) and is_Integer(P2): R = PolynomialRing(self.value_ring(), 'x') P1 = R(P1) P2 = R(P2) return JacobianMorphism_divisor_class_field(self, tuple([P1,P2])) if is_Integer(P1) and is_Polynomial(P2): R = PolynomialRing(self.value_ring(), 'x') P1 = R(P1) return JacobianMorphism_divisor_clas... | 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... | b145a02af12fbf8d66f63a5059612d089cce212b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b145a02af12fbf8d66f63a5059612d089cce212b/jacobian_homset.py |
sage: P1 in G | sage: P1 in G | def _call_(self, x): r""" TEST:: | 6a5183fe302ca98df16b43da14542e79c68fed7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6a5183fe302ca98df16b43da14542e79c68fed7f/additive_abelian_wrapper.py |
return u[0] | return u[0].vector() | 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] | 6a5183fe302ca98df16b43da14542e79c68fed7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6a5183fe302ca98df16b43da14542e79c68fed7f/additive_abelian_wrapper.py |
Some cases that check on the negative twists:: | Some harder cases fail:: | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
-2 | 1 | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
Dlist = [5,8,12,13,17,21,24,28,29] | Dlist = [5,8,12,13,17,21,24,28,29, 33, 37, 40, 41, 44, 53, 56, 57, 60, 61, 65, 69, 73, 76, 77, 85, 88, 89, 92, 93, 97] | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
while j < 9 and at0 == 0 : | while j < 30 and at0 == 0 : | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
chtw = True for ell in prime_divisors(D): chtw = chtw and ( valuation(E.conductor(),ell)<= valuation(D,ell) ) if chtw : | if all( valuation(E.conductor(),ell)<= valuation(D,ell) for ell in prime_divisors(D) ) : | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
if j == 9 and at0 == 0: sc = 1 if not self._use_eclib : msn = ModularSymbolSage(self._E,sign = -1,normalize = "L_ratio") sc = msn._scaling if sc == 0 or self._use_eclib : self.__scale_by_periods_only__() else : self._scaling = sc | if j == 30 and at0 == 0: self.__scale_by_periods_only__() | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
verbose('scale modular symbols by %s'%(l1/at0)) | verbose('scale modular symbols by %s found at D=%s '%(l1/at0,D), level=2) | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
Dlist = [-3,-4,-7,-8,-11,-15,-19,-20,-23,-24] | Dlist = [-3,-4,-7,-8,-11,-15,-19,-20,-23,-24, -31, -35, -39, -40, -43, -47, -51, -52, -55, -56, -59, -67, -68, -71, -79, -83, -84, -87, -88, -91] | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
while j < 9 and at0 == 0 : | while j < 30 and at0 == 0 : | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
chtw = True for ell in prime_divisors(D): chtw = chtw and ( valuation(E.conductor(),ell)<= valuation(D,ell) ) if chtw : | if all( valuation(E.conductor(),ell)<= valuation(D,ell) for ell in prime_divisors(D) ) : | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
if j == 9 and at0 == 0: | if j == 30 and at0 == 0: | def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rationa... | e7be0030cd1a8c8e471150145c5697dbf01cf489 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e7be0030cd1a8c8e471150145c5697dbf01cf489/ell_modular_symbols.py |
self._option["pdflatex"] = False | self._option["engine"] = "latex" self._option["engine_name"] = "LaTeX" | def __init__(self, bb=False, delimiters=["(", ")"]): """ Define an object that holds LaTeX global preferences. """ self._option = {} self._option["blackboard_bold"] = bb self._option["matrix_delimiters"] = list(delimiters) self._option["vector_delimiters"] = list(delimiters) self._option["macros"] = "" self._option["pr... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): | def _run_latex_(filename, debug=False, density=150, engine=None, png=False, do_in_background=False): | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
"filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't convert the dvi file to png (because of postscript specials or other issues), then dvips is called, and the PS file is converted to a png file. | "filename.dvi" (or "filename.pdf"` if engine is either ``pdflatex`` or ``xelatex'') and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't convert the dvi file to png (because of postscript specials or other issues), then dvips is called, and the PS file is converted to a png file. | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
- ``pdflatex`` - bool (optional, default False): whether to use pdflatex. | - ``engine`` - string: latex engine to use. | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
``pdflatex`` is False, then a dvi file is created, but if there | engine is latex or None, then a dvi file is created, but if there | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
returned.) If ``pdflatex`` is True and there are no errors, then | returned.) If engine is pdflatex or xelatex and there are no errors, then | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
pdflatex, you must have 'convert' installed. | pdflatex or xelatex, you must have 'convert' installed. | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
if pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] if not pdflatex and not have_latex(): | if engine is None: engine = _Latex_prefs._option["engine"] if not engine and not have_latex(): | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
if pdflatex and not have_pdflatex(): print "Error: PDFLaTeX does not seem to be installed. Download it from" | if engine and not have_pdflatex() and not have_xelatex(): print "Error: %s does not seem to be installed. Download it from" % _Latex_prefs._option["engine_name"] | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
if not pdflatex and not (have_dvipng() or have_convert()): | if (not engine or engine == "latex") and not (have_dvipng() or have_convert()): | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
print "appear to be installed. Displaying LaTeX or PDFLaTeX output" | print "appear to be installed. Displaying LaTeX, PDFLaTeX output" | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
elif pdflatex and not have_convert(): | elif engine == "pdflatex" and not have_convert(): | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
if pdflatex: | if not engine or engine == "latex": command = "latex" suffix = "ps" return_suffix = "dvi" elif engine == "pdflatex": | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
command = "latex" suffix = "ps" return_suffix = "dvi" | raise ValueError, "Unsupported LaTeX engine." | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
if pdflatex: | if engine == "pdflatex" or engine == "xelatex": | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
e = os.system(cmd + ' ' + redirect + background) else: | e = os.system(cmd + ' ' + redirect + background) else: | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
def __init__(self, debug=False, slide=False, density=150, pdflatex=None): | def __init__(self, debug=False, slide=False, density=150, pdflatex=None, engine=None): | def __init__(self, debug=False, slide=False, density=150, pdflatex=None): self.__debug = debug self.__slide = slide self.__pdflatex = pdflatex self.__density = density | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
def _relation_symbols(self): """ Returns a dictionary whose keys are attributes of the :mod:`operator` module and whose values are the corresponding LaTeX expressions. EXAMPLES:: | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py | ||
density=None, pdflatex=None, locals={}): | density=None, pdflatex=None, engine=None, locals={}): | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
- ``pdflatex`` - whether to use pdflatex. | - ``pdflatex`` - whether to use pdflatex. This is deprecated. Use ``engine`` option instead. - ``engine`` - latex engine to use. Currently latex, pdflatex, and xelatex are supported. | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
or this command won't work. When using pdflatex, you must | or this command won't work. When using pdflatex or xelatex, you must | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
if pdflatex is None: if self.__pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] | if engine is None: if self.__engine is None: engine = _Latex_prefs._option["engine"] | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
pdflatex = bool(self.__pdflatex) | engine = self.__engine | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
density=density, pdflatex=pdflatex, png=True) | density=density, engine=engine, png=True) | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
def pdflatex(self, t = None): """ | def pdflatex(self, t = None): """ This is deprecated. Use engine("pdflatex") instead. | def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
sage: latex.pdflatex() | sage: latex.pdflatex() doctest:...: DeprecationWarning: Use engine() instead. | def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
sage: latex.pdflatex(False) | sage: latex.pdflatex(False) doctest:...: DeprecationWarning: Use engine("latex") instead. | def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
return _Latex_prefs._option["pdflatex"] _Latex_prefs._option["pdflatex"] = bool(t) | from sage.misc.misc import deprecation deprecation('Use engine() instead.') return _Latex_prefs._option["engine"] == "pdflatex" elif t: from sage.misc.misc import deprecation deprecation('Use engine("pdflatex") instead.') self.engine("pdflatex") else: from sage.misc.misc import deprecation deprecation('Use engine("late... | def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, engine=None, viewer = None, tightpage = None, mode='inline', **kwds): | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
- ``pdflatex`` - bool (default: False): use pdflatex. | - ``pdflatex`` - bool (default: False): use pdflatex. This is deprecated. Use 'engine' option instead. - ``engine`` - 'latex', 'pdflatex', or 'xelatex' | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
If ``pdflatex`` is ``True``, then this produces a pdf file. Otherwise, it produces a dvi file, and if the program dvipng is | If ``pdflatex`` is ``True``, then the latex engine is set to pdflatex. If the engine is either pdflatex or xelatex, it produces a pdf file. Otherwise, it produces a dvi file, and if the program dvipng is | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
viewer, even in notebook mode. This also sets ``pdflatex`` to ``True``. | viewer, even in notebook mode. This also sets the latex engine to be ``pdflatex`` if the current engine is latex. | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
debug=debug, do_in_background=False, pdflatex=pdflatex) | debug=debug, do_in_background=False, engine=engine) | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | 0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.