__init__.py 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. """
  2. SymPy is a Python library for symbolic mathematics. It aims to become a
  3. full-featured computer algebra system (CAS) while keeping the code as simple
  4. as possible in order to be comprehensible and easily extensible. SymPy is
  5. written entirely in Python. It depends on mpmath, and other external libraries
  6. may be optionally for things like plotting support.
  7. See the webpage for more information and documentation:
  8. https://sympy.org
  9. """
  10. import sys
  11. if sys.version_info < (3, 7):
  12. raise ImportError("Python version 3.7 or above is required for SymPy.")
  13. del sys
  14. try:
  15. import mpmath
  16. except ImportError:
  17. raise ImportError("SymPy now depends on mpmath as an external library. "
  18. "See https://docs.sympy.org/latest/install.html#mpmath for more information.")
  19. del mpmath
  20. from sympy.release import __version__
  21. if 'dev' in __version__:
  22. def enable_warnings():
  23. import warnings
  24. warnings.filterwarnings('default', '.*', DeprecationWarning, module='sympy.*')
  25. del warnings
  26. enable_warnings()
  27. del enable_warnings
  28. def __sympy_debug():
  29. # helper function so we don't import os globally
  30. import os
  31. debug_str = os.getenv('SYMPY_DEBUG', 'False')
  32. if debug_str in ('True', 'False'):
  33. return eval(debug_str)
  34. else:
  35. raise RuntimeError("unrecognized value for SYMPY_DEBUG: %s" %
  36. debug_str)
  37. SYMPY_DEBUG = __sympy_debug() # type: bool
  38. from .core import (sympify, SympifyError, cacheit, Basic, Atom,
  39. preorder_traversal, S, Expr, AtomicExpr, UnevaluatedExpr, Symbol,
  40. Wild, Dummy, symbols, var, Number, Float, Rational, Integer,
  41. NumberSymbol, RealNumber, igcd, ilcm, seterr, E, I, nan, oo, pi, zoo,
  42. AlgebraicNumber, comp, mod_inverse, Pow, integer_nthroot, integer_log,
  43. Mul, prod, Add, Mod, Rel, Eq, Ne, Lt, Le, Gt, Ge, Equality,
  44. GreaterThan, LessThan, Unequality, StrictGreaterThan, StrictLessThan,
  45. vectorize, Lambda, WildFunction, Derivative, diff, FunctionClass,
  46. Function, Subs, expand, PoleError, count_ops, expand_mul, expand_log,
  47. expand_func, expand_trig, expand_complex, expand_multinomial, nfloat,
  48. expand_power_base, expand_power_exp, arity, PrecisionExhausted, N,
  49. evalf, Tuple, Dict, gcd_terms, factor_terms, factor_nc, evaluate,
  50. Catalan, EulerGamma, GoldenRatio, TribonacciConstant, bottom_up, use,
  51. postorder_traversal, default_sort_key, ordered)
  52. from .logic import (to_cnf, to_dnf, to_nnf, And, Or, Not, Xor, Nand, Nor,
  53. Implies, Equivalent, ITE, POSform, SOPform, simplify_logic, bool_map,
  54. true, false, satisfiable)
  55. from .assumptions import (AppliedPredicate, Predicate, AssumptionsContext,
  56. assuming, Q, ask, register_handler, remove_handler, refine)
  57. from .polys import (Poly, PurePoly, poly_from_expr, parallel_poly_from_expr,
  58. degree, total_degree, degree_list, LC, LM, LT, pdiv, prem, pquo,
  59. pexquo, div, rem, quo, exquo, half_gcdex, gcdex, invert,
  60. subresultants, resultant, discriminant, cofactors, gcd_list, gcd,
  61. lcm_list, lcm, terms_gcd, trunc, monic, content, primitive, compose,
  62. decompose, sturm, gff_list, gff, sqf_norm, sqf_part, sqf_list, sqf,
  63. factor_list, factor, intervals, refine_root, count_roots, real_roots,
  64. nroots, ground_roots, nth_power_roots_poly, cancel, reduced, groebner,
  65. is_zero_dimensional, GroebnerBasis, poly, symmetrize, horner,
  66. interpolate, rational_interpolate, viete, together,
  67. BasePolynomialError, ExactQuotientFailed, PolynomialDivisionFailed,
  68. OperationNotSupported, HeuristicGCDFailed, HomomorphismFailed,
  69. IsomorphismFailed, ExtraneousFactors, EvaluationFailed,
  70. RefinementFailed, CoercionFailed, NotInvertible, NotReversible,
  71. NotAlgebraic, DomainError, PolynomialError, UnificationFailed,
  72. GeneratorsError, GeneratorsNeeded, ComputationFailed,
  73. UnivariatePolynomialError, MultivariatePolynomialError,
  74. PolificationFailed, OptionError, FlagError, minpoly,
  75. minimal_polynomial, primitive_element, field_isomorphism,
  76. to_number_field, isolate, round_two, prime_decomp, prime_valuation,
  77. itermonomials, Monomial, lex, grlex,
  78. grevlex, ilex, igrlex, igrevlex, CRootOf, rootof, RootOf,
  79. ComplexRootOf, RootSum, roots, Domain, FiniteField, IntegerRing,
  80. RationalField, RealField, ComplexField, PythonFiniteField,
  81. GMPYFiniteField, PythonIntegerRing, GMPYIntegerRing, PythonRational,
  82. GMPYRationalField, AlgebraicField, PolynomialRing, FractionField,
  83. ExpressionDomain, FF_python, FF_gmpy, ZZ_python, ZZ_gmpy, QQ_python,
  84. QQ_gmpy, GF, FF, ZZ, QQ, ZZ_I, QQ_I, RR, CC, EX, EXRAW,
  85. construct_domain, swinnerton_dyer_poly, cyclotomic_poly,
  86. symmetric_poly, random_poly, interpolating_poly, jacobi_poly,
  87. chebyshevt_poly, chebyshevu_poly, hermite_poly, legendre_poly,
  88. laguerre_poly, apart, apart_list, assemble_partfrac_list, Options,
  89. ring, xring, vring, sring, field, xfield, vfield, sfield)
  90. from .series import (Order, O, limit, Limit, gruntz, series, approximants,
  91. residue, EmptySequence, SeqPer, SeqFormula, sequence, SeqAdd, SeqMul,
  92. fourier_series, fps, difference_delta, limit_seq)
  93. from .functions import (factorial, factorial2, rf, ff, binomial,
  94. RisingFactorial, FallingFactorial, subfactorial, carmichael,
  95. fibonacci, lucas, motzkin, tribonacci, harmonic, bernoulli, bell, euler,
  96. catalan, genocchi, partition, sqrt, root, Min, Max, Id, real_root, Rem,
  97. cbrt, re, im, sign, Abs, conjugate, arg, polar_lift,
  98. periodic_argument, unbranched_argument, principal_branch, transpose,
  99. adjoint, polarify, unpolarify, sin, cos, tan, sec, csc, cot, sinc,
  100. asin, acos, atan, asec, acsc, acot, atan2, exp_polar, exp, ln, log,
  101. LambertW, sinh, cosh, tanh, coth, sech, csch, asinh, acosh, atanh,
  102. acoth, asech, acsch, floor, ceiling, frac, Piecewise, piecewise_fold,
  103. erf, erfc, erfi, erf2, erfinv, erfcinv, erf2inv, Ei, expint, E1, li,
  104. Li, Si, Ci, Shi, Chi, fresnels, fresnelc, gamma, lowergamma,
  105. uppergamma, polygamma, loggamma, digamma, trigamma, multigamma,
  106. dirichlet_eta, zeta, lerchphi, polylog, stieltjes, Eijk, LeviCivita,
  107. KroneckerDelta, SingularityFunction, DiracDelta, Heaviside,
  108. bspline_basis, bspline_basis_set, interpolating_spline, besselj,
  109. bessely, besseli, besselk, hankel1, hankel2, jn, yn, jn_zeros, hn1,
  110. hn2, airyai, airybi, airyaiprime, airybiprime, marcumq, hyper,
  111. meijerg, appellf1, legendre, assoc_legendre, hermite, chebyshevt,
  112. chebyshevu, chebyshevu_root, chebyshevt_root, laguerre,
  113. assoc_laguerre, gegenbauer, jacobi, jacobi_normalized, Ynm, Ynm_c,
  114. Znm, elliptic_k, elliptic_f, elliptic_e, elliptic_pi, beta, mathieus,
  115. mathieuc, mathieusprime, mathieucprime, riemann_xi, betainc, betainc_regularized)
  116. from .ntheory import (nextprime, prevprime, prime, primepi, primerange,
  117. randprime, Sieve, sieve, primorial, cycle_length, composite,
  118. compositepi, isprime, divisors, proper_divisors, factorint,
  119. multiplicity, perfect_power, pollard_pm1, pollard_rho, primefactors,
  120. totient, trailing, divisor_count, proper_divisor_count, divisor_sigma,
  121. factorrat, reduced_totient, primenu, primeomega,
  122. mersenne_prime_exponent, is_perfect, is_mersenne_prime, is_abundant,
  123. is_deficient, is_amicable, abundance, npartitions, is_primitive_root,
  124. is_quad_residue, legendre_symbol, jacobi_symbol, n_order, sqrt_mod,
  125. quadratic_residues, primitive_root, nthroot_mod, is_nthpow_residue,
  126. sqrt_mod_iter, mobius, discrete_log, quadratic_congruence,
  127. binomial_coefficients, binomial_coefficients_list,
  128. multinomial_coefficients, continued_fraction_periodic,
  129. continued_fraction_iterator, continued_fraction_reduce,
  130. continued_fraction_convergents, continued_fraction, egyptian_fraction)
  131. from .concrete import product, Product, summation, Sum
  132. from .discrete import (fft, ifft, ntt, intt, fwht, ifwht, mobius_transform,
  133. inverse_mobius_transform, convolution, covering_product,
  134. intersecting_product)
  135. from .simplify import (simplify, hypersimp, hypersimilar, logcombine,
  136. separatevars, posify, besselsimp, kroneckersimp, signsimp,
  137. nsimplify, FU, fu, sqrtdenest, cse, epath, EPath, hyperexpand,
  138. collect, rcollect, radsimp, collect_const, fraction, numer, denom,
  139. trigsimp, exptrigsimp, powsimp, powdenest, combsimp, gammasimp,
  140. ratsimp, ratsimpmodprime)
  141. from .sets import (Set, Interval, Union, EmptySet, FiniteSet, ProductSet,
  142. Intersection, DisjointUnion, imageset, Complement, SymmetricDifference, ImageSet,
  143. Range, ComplexRegion, Complexes, Reals, Contains, ConditionSet, Ordinal,
  144. OmegaPower, ord0, PowerSet, Naturals, Naturals0, UniversalSet,
  145. Integers, Rationals)
  146. from .solvers import (solve, solve_linear_system, solve_linear_system_LU,
  147. solve_undetermined_coeffs, nsolve, solve_linear, checksol, det_quick,
  148. inv_quick, check_assumptions, failing_assumptions, diophantine,
  149. rsolve, rsolve_poly, rsolve_ratio, rsolve_hyper, checkodesol,
  150. classify_ode, dsolve, homogeneous_order, solve_poly_system,
  151. solve_triangulated, pde_separate, pde_separate_add, pde_separate_mul,
  152. pdsolve, classify_pde, checkpdesol, ode_order, reduce_inequalities,
  153. reduce_abs_inequality, reduce_abs_inequalities, solve_poly_inequality,
  154. solve_rational_inequalities, solve_univariate_inequality, decompogen,
  155. solveset, linsolve, linear_eq_to_matrix, nonlinsolve, substitution)
  156. from .matrices import (ShapeError, NonSquareMatrixError, GramSchmidt,
  157. casoratian, diag, eye, hessian, jordan_cell, list2numpy, matrix2numpy,
  158. matrix_multiply_elementwise, ones, randMatrix, rot_axis1, rot_axis2,
  159. rot_axis3, symarray, wronskian, zeros, MutableDenseMatrix,
  160. DeferredVector, MatrixBase, Matrix, MutableMatrix,
  161. MutableSparseMatrix, banded, ImmutableDenseMatrix,
  162. ImmutableSparseMatrix, ImmutableMatrix, SparseMatrix, MatrixSlice,
  163. BlockDiagMatrix, BlockMatrix, FunctionMatrix, Identity, Inverse,
  164. MatAdd, MatMul, MatPow, MatrixExpr, MatrixSymbol, Trace, Transpose,
  165. ZeroMatrix, OneMatrix, blockcut, block_collapse, matrix_symbols,
  166. Adjoint, hadamard_product, HadamardProduct, HadamardPower,
  167. Determinant, det, diagonalize_vector, DiagMatrix, DiagonalMatrix,
  168. DiagonalOf, trace, DotProduct, kronecker_product, KroneckerProduct,
  169. PermutationMatrix, MatrixPermute, Permanent, per)
  170. from .geometry import (Point, Point2D, Point3D, Line, Ray, Segment, Line2D,
  171. Segment2D, Ray2D, Line3D, Segment3D, Ray3D, Plane, Ellipse, Circle,
  172. Polygon, RegularPolygon, Triangle, rad, deg, are_similar, centroid,
  173. convex_hull, idiff, intersection, closest_points, farthest_points,
  174. GeometryError, Curve, Parabola)
  175. from .utilities import (flatten, group, take, subsets, variations,
  176. numbered_symbols, cartes, capture, dict_merge, prefixes, postfixes,
  177. sift, topological_sort, unflatten, has_dups, has_variety, reshape,
  178. rotations, filldedent, lambdify, source,
  179. threaded, xthreaded, public, memoize_property, timed)
  180. from .integrals import (integrate, Integral, line_integrate, mellin_transform,
  181. inverse_mellin_transform, MellinTransform, InverseMellinTransform,
  182. laplace_transform, inverse_laplace_transform, LaplaceTransform,
  183. InverseLaplaceTransform, fourier_transform, inverse_fourier_transform,
  184. FourierTransform, InverseFourierTransform, sine_transform,
  185. inverse_sine_transform, SineTransform, InverseSineTransform,
  186. cosine_transform, inverse_cosine_transform, CosineTransform,
  187. InverseCosineTransform, hankel_transform, inverse_hankel_transform,
  188. HankelTransform, InverseHankelTransform, singularityintegrate)
  189. from .tensor import (IndexedBase, Idx, Indexed, get_contraction_structure,
  190. get_indices, shape, MutableDenseNDimArray, ImmutableDenseNDimArray,
  191. MutableSparseNDimArray, ImmutableSparseNDimArray, NDimArray,
  192. tensorproduct, tensorcontraction, tensordiagonal, derive_by_array,
  193. permutedims, Array, DenseNDimArray, SparseNDimArray)
  194. from .parsing import parse_expr
  195. from .calculus import (euler_equations, singularities, is_increasing,
  196. is_strictly_increasing, is_decreasing, is_strictly_decreasing,
  197. is_monotonic, finite_diff_weights, apply_finite_diff,
  198. differentiate_finite, periodicity, not_empty_in, AccumBounds,
  199. is_convex, stationary_points, minimum, maximum)
  200. from .algebras import Quaternion
  201. from .printing import (pager_print, pretty, pretty_print, pprint,
  202. pprint_use_unicode, pprint_try_use_unicode, latex, print_latex,
  203. multiline_latex, mathml, print_mathml, python, print_python, pycode,
  204. ccode, print_ccode, glsl_code, print_glsl, cxxcode, fcode,
  205. print_fcode, rcode, print_rcode, jscode, print_jscode, julia_code,
  206. mathematica_code, octave_code, rust_code, print_gtk, preview, srepr,
  207. print_tree, StrPrinter, sstr, sstrrepr, TableForm, dotprint,
  208. maple_code, print_maple_code)
  209. from .testing import test, doctest
  210. # This module causes conflicts with other modules:
  211. # from .stats import *
  212. # Adds about .04-.05 seconds of import time
  213. # from combinatorics import *
  214. # This module is slow to import:
  215. #from physics import units
  216. from .plotting import plot, textplot, plot_backends, plot_implicit, plot_parametric
  217. from .interactive import init_session, init_printing, interactive_traversal
  218. evalf._create_evalf_table()
  219. __all__ = [
  220. # sympy.core
  221. 'sympify', 'SympifyError', 'cacheit', 'Basic', 'Atom',
  222. 'preorder_traversal', 'S', 'Expr', 'AtomicExpr', 'UnevaluatedExpr',
  223. 'Symbol', 'Wild', 'Dummy', 'symbols', 'var', 'Number', 'Float',
  224. 'Rational', 'Integer', 'NumberSymbol', 'RealNumber', 'igcd', 'ilcm',
  225. 'seterr', 'E', 'I', 'nan', 'oo', 'pi', 'zoo', 'AlgebraicNumber', 'comp',
  226. 'mod_inverse', 'Pow', 'integer_nthroot', 'integer_log', 'Mul', 'prod',
  227. 'Add', 'Mod', 'Rel', 'Eq', 'Ne', 'Lt', 'Le', 'Gt', 'Ge', 'Equality',
  228. 'GreaterThan', 'LessThan', 'Unequality', 'StrictGreaterThan',
  229. 'StrictLessThan', 'vectorize', 'Lambda', 'WildFunction', 'Derivative',
  230. 'diff', 'FunctionClass', 'Function', 'Subs', 'expand', 'PoleError',
  231. 'count_ops', 'expand_mul', 'expand_log', 'expand_func', 'expand_trig',
  232. 'expand_complex', 'expand_multinomial', 'nfloat', 'expand_power_base',
  233. 'expand_power_exp', 'arity', 'PrecisionExhausted', 'N', 'evalf', 'Tuple',
  234. 'Dict', 'gcd_terms', 'factor_terms', 'factor_nc', 'evaluate', 'Catalan',
  235. 'EulerGamma', 'GoldenRatio', 'TribonacciConstant', 'bottom_up', 'use',
  236. 'postorder_traversal', 'default_sort_key', 'ordered',
  237. # sympy.logic
  238. 'to_cnf', 'to_dnf', 'to_nnf', 'And', 'Or', 'Not', 'Xor', 'Nand', 'Nor',
  239. 'Implies', 'Equivalent', 'ITE', 'POSform', 'SOPform', 'simplify_logic',
  240. 'bool_map', 'true', 'false', 'satisfiable',
  241. # sympy.assumptions
  242. 'AppliedPredicate', 'Predicate', 'AssumptionsContext', 'assuming', 'Q',
  243. 'ask', 'register_handler', 'remove_handler', 'refine',
  244. # sympy.polys
  245. 'Poly', 'PurePoly', 'poly_from_expr', 'parallel_poly_from_expr', 'degree',
  246. 'total_degree', 'degree_list', 'LC', 'LM', 'LT', 'pdiv', 'prem', 'pquo',
  247. 'pexquo', 'div', 'rem', 'quo', 'exquo', 'half_gcdex', 'gcdex', 'invert',
  248. 'subresultants', 'resultant', 'discriminant', 'cofactors', 'gcd_list',
  249. 'gcd', 'lcm_list', 'lcm', 'terms_gcd', 'trunc', 'monic', 'content',
  250. 'primitive', 'compose', 'decompose', 'sturm', 'gff_list', 'gff',
  251. 'sqf_norm', 'sqf_part', 'sqf_list', 'sqf', 'factor_list', 'factor',
  252. 'intervals', 'refine_root', 'count_roots', 'real_roots', 'nroots',
  253. 'ground_roots', 'nth_power_roots_poly', 'cancel', 'reduced', 'groebner',
  254. 'is_zero_dimensional', 'GroebnerBasis', 'poly', 'symmetrize', 'horner',
  255. 'interpolate', 'rational_interpolate', 'viete', 'together',
  256. 'BasePolynomialError', 'ExactQuotientFailed', 'PolynomialDivisionFailed',
  257. 'OperationNotSupported', 'HeuristicGCDFailed', 'HomomorphismFailed',
  258. 'IsomorphismFailed', 'ExtraneousFactors', 'EvaluationFailed',
  259. 'RefinementFailed', 'CoercionFailed', 'NotInvertible', 'NotReversible',
  260. 'NotAlgebraic', 'DomainError', 'PolynomialError', 'UnificationFailed',
  261. 'GeneratorsError', 'GeneratorsNeeded', 'ComputationFailed',
  262. 'UnivariatePolynomialError', 'MultivariatePolynomialError',
  263. 'PolificationFailed', 'OptionError', 'FlagError', 'minpoly',
  264. 'minimal_polynomial', 'primitive_element', 'field_isomorphism',
  265. 'to_number_field', 'isolate', 'round_two', 'prime_decomp',
  266. 'prime_valuation', 'itermonomials', 'Monomial', 'lex', 'grlex',
  267. 'grevlex', 'ilex', 'igrlex', 'igrevlex', 'CRootOf', 'rootof', 'RootOf',
  268. 'ComplexRootOf', 'RootSum', 'roots', 'Domain', 'FiniteField',
  269. 'IntegerRing', 'RationalField', 'RealField', 'ComplexField',
  270. 'PythonFiniteField', 'GMPYFiniteField', 'PythonIntegerRing',
  271. 'GMPYIntegerRing', 'PythonRational', 'GMPYRationalField',
  272. 'AlgebraicField', 'PolynomialRing', 'FractionField', 'ExpressionDomain',
  273. 'FF_python', 'FF_gmpy', 'ZZ_python', 'ZZ_gmpy', 'QQ_python', 'QQ_gmpy',
  274. 'GF', 'FF', 'ZZ', 'QQ', 'ZZ_I', 'QQ_I', 'RR', 'CC', 'EX', 'EXRAW',
  275. 'construct_domain', 'swinnerton_dyer_poly', 'cyclotomic_poly',
  276. 'symmetric_poly', 'random_poly', 'interpolating_poly', 'jacobi_poly',
  277. 'chebyshevt_poly', 'chebyshevu_poly', 'hermite_poly', 'legendre_poly',
  278. 'laguerre_poly', 'apart', 'apart_list', 'assemble_partfrac_list',
  279. 'Options', 'ring', 'xring', 'vring', 'sring', 'field', 'xfield', 'vfield',
  280. 'sfield',
  281. # sympy.series
  282. 'Order', 'O', 'limit', 'Limit', 'gruntz', 'series', 'approximants',
  283. 'residue', 'EmptySequence', 'SeqPer', 'SeqFormula', 'sequence', 'SeqAdd',
  284. 'SeqMul', 'fourier_series', 'fps', 'difference_delta', 'limit_seq',
  285. # sympy.functions
  286. 'factorial', 'factorial2', 'rf', 'ff', 'binomial', 'RisingFactorial',
  287. 'FallingFactorial', 'subfactorial', 'carmichael', 'fibonacci', 'lucas',
  288. 'motzkin', 'tribonacci', 'harmonic', 'bernoulli', 'bell', 'euler', 'catalan',
  289. 'genocchi', 'partition', 'sqrt', 'root', 'Min', 'Max', 'Id', 'real_root', 'Rem',
  290. 'cbrt', 're', 'im', 'sign', 'Abs', 'conjugate', 'arg', 'polar_lift',
  291. 'periodic_argument', 'unbranched_argument', 'principal_branch',
  292. 'transpose', 'adjoint', 'polarify', 'unpolarify', 'sin', 'cos', 'tan',
  293. 'sec', 'csc', 'cot', 'sinc', 'asin', 'acos', 'atan', 'asec', 'acsc',
  294. 'acot', 'atan2', 'exp_polar', 'exp', 'ln', 'log', 'LambertW', 'sinh',
  295. 'cosh', 'tanh', 'coth', 'sech', 'csch', 'asinh', 'acosh', 'atanh',
  296. 'acoth', 'asech', 'acsch', 'floor', 'ceiling', 'frac', 'Piecewise',
  297. 'piecewise_fold', 'erf', 'erfc', 'erfi', 'erf2', 'erfinv', 'erfcinv',
  298. 'erf2inv', 'Ei', 'expint', 'E1', 'li', 'Li', 'Si', 'Ci', 'Shi', 'Chi',
  299. 'fresnels', 'fresnelc', 'gamma', 'lowergamma', 'uppergamma', 'polygamma',
  300. 'loggamma', 'digamma', 'trigamma', 'multigamma', 'dirichlet_eta', 'zeta',
  301. 'lerchphi', 'polylog', 'stieltjes', 'Eijk', 'LeviCivita',
  302. 'KroneckerDelta', 'SingularityFunction', 'DiracDelta', 'Heaviside',
  303. 'bspline_basis', 'bspline_basis_set', 'interpolating_spline', 'besselj',
  304. 'bessely', 'besseli', 'besselk', 'hankel1', 'hankel2', 'jn', 'yn',
  305. 'jn_zeros', 'hn1', 'hn2', 'airyai', 'airybi', 'airyaiprime',
  306. 'airybiprime', 'marcumq', 'hyper', 'meijerg', 'appellf1', 'legendre',
  307. 'assoc_legendre', 'hermite', 'chebyshevt', 'chebyshevu',
  308. 'chebyshevu_root', 'chebyshevt_root', 'laguerre', 'assoc_laguerre',
  309. 'gegenbauer', 'jacobi', 'jacobi_normalized', 'Ynm', 'Ynm_c', 'Znm',
  310. 'elliptic_k', 'elliptic_f', 'elliptic_e', 'elliptic_pi', 'beta',
  311. 'mathieus', 'mathieuc', 'mathieusprime', 'mathieucprime', 'riemann_xi','betainc',
  312. 'betainc_regularized',
  313. # sympy.ntheory
  314. 'nextprime', 'prevprime', 'prime', 'primepi', 'primerange', 'randprime',
  315. 'Sieve', 'sieve', 'primorial', 'cycle_length', 'composite', 'compositepi',
  316. 'isprime', 'divisors', 'proper_divisors', 'factorint', 'multiplicity',
  317. 'perfect_power', 'pollard_pm1', 'pollard_rho', 'primefactors', 'totient',
  318. 'trailing', 'divisor_count', 'proper_divisor_count', 'divisor_sigma',
  319. 'factorrat', 'reduced_totient', 'primenu', 'primeomega',
  320. 'mersenne_prime_exponent', 'is_perfect', 'is_mersenne_prime',
  321. 'is_abundant', 'is_deficient', 'is_amicable', 'abundance', 'npartitions',
  322. 'is_primitive_root', 'is_quad_residue', 'legendre_symbol',
  323. 'jacobi_symbol', 'n_order', 'sqrt_mod', 'quadratic_residues',
  324. 'primitive_root', 'nthroot_mod', 'is_nthpow_residue', 'sqrt_mod_iter',
  325. 'mobius', 'discrete_log', 'quadratic_congruence', 'binomial_coefficients',
  326. 'binomial_coefficients_list', 'multinomial_coefficients',
  327. 'continued_fraction_periodic', 'continued_fraction_iterator',
  328. 'continued_fraction_reduce', 'continued_fraction_convergents',
  329. 'continued_fraction', 'egyptian_fraction',
  330. # sympy.concrete
  331. 'product', 'Product', 'summation', 'Sum',
  332. # sympy.discrete
  333. 'fft', 'ifft', 'ntt', 'intt', 'fwht', 'ifwht', 'mobius_transform',
  334. 'inverse_mobius_transform', 'convolution', 'covering_product',
  335. 'intersecting_product',
  336. # sympy.simplify
  337. 'simplify', 'hypersimp', 'hypersimilar', 'logcombine', 'separatevars',
  338. 'posify', 'besselsimp', 'kroneckersimp', 'signsimp',
  339. 'nsimplify', 'FU', 'fu', 'sqrtdenest', 'cse', 'epath', 'EPath',
  340. 'hyperexpand', 'collect', 'rcollect', 'radsimp', 'collect_const',
  341. 'fraction', 'numer', 'denom', 'trigsimp', 'exptrigsimp', 'powsimp',
  342. 'powdenest', 'combsimp', 'gammasimp', 'ratsimp', 'ratsimpmodprime',
  343. # sympy.sets
  344. 'Set', 'Interval', 'Union', 'EmptySet', 'FiniteSet', 'ProductSet',
  345. 'Intersection', 'imageset', 'DisjointUnion', 'Complement', 'SymmetricDifference',
  346. 'ImageSet', 'Range', 'ComplexRegion', 'Reals', 'Contains', 'ConditionSet',
  347. 'Ordinal', 'OmegaPower', 'ord0', 'PowerSet', 'Naturals',
  348. 'Naturals0', 'UniversalSet', 'Integers', 'Rationals', 'Complexes',
  349. # sympy.solvers
  350. 'solve', 'solve_linear_system', 'solve_linear_system_LU',
  351. 'solve_undetermined_coeffs', 'nsolve', 'solve_linear', 'checksol',
  352. 'det_quick', 'inv_quick', 'check_assumptions', 'failing_assumptions',
  353. 'diophantine', 'rsolve', 'rsolve_poly', 'rsolve_ratio', 'rsolve_hyper',
  354. 'checkodesol', 'classify_ode', 'dsolve', 'homogeneous_order',
  355. 'solve_poly_system', 'solve_triangulated', 'pde_separate',
  356. 'pde_separate_add', 'pde_separate_mul', 'pdsolve', 'classify_pde',
  357. 'checkpdesol', 'ode_order', 'reduce_inequalities',
  358. 'reduce_abs_inequality', 'reduce_abs_inequalities',
  359. 'solve_poly_inequality', 'solve_rational_inequalities',
  360. 'solve_univariate_inequality', 'decompogen', 'solveset', 'linsolve',
  361. 'linear_eq_to_matrix', 'nonlinsolve', 'substitution',
  362. # sympy.matrices
  363. 'ShapeError', 'NonSquareMatrixError', 'GramSchmidt', 'casoratian', 'diag',
  364. 'eye', 'hessian', 'jordan_cell', 'list2numpy', 'matrix2numpy',
  365. 'matrix_multiply_elementwise', 'ones', 'randMatrix', 'rot_axis1',
  366. 'rot_axis2', 'rot_axis3', 'symarray', 'wronskian', 'zeros',
  367. 'MutableDenseMatrix', 'DeferredVector', 'MatrixBase', 'Matrix',
  368. 'MutableMatrix', 'MutableSparseMatrix', 'banded', 'ImmutableDenseMatrix',
  369. 'ImmutableSparseMatrix', 'ImmutableMatrix', 'SparseMatrix', 'MatrixSlice',
  370. 'BlockDiagMatrix', 'BlockMatrix', 'FunctionMatrix', 'Identity', 'Inverse',
  371. 'MatAdd', 'MatMul', 'MatPow', 'MatrixExpr', 'MatrixSymbol', 'Trace',
  372. 'Transpose', 'ZeroMatrix', 'OneMatrix', 'blockcut', 'block_collapse',
  373. 'matrix_symbols', 'Adjoint', 'hadamard_product', 'HadamardProduct',
  374. 'HadamardPower', 'Determinant', 'det', 'diagonalize_vector', 'DiagMatrix',
  375. 'DiagonalMatrix', 'DiagonalOf', 'trace', 'DotProduct',
  376. 'kronecker_product', 'KroneckerProduct', 'PermutationMatrix',
  377. 'MatrixPermute', 'Permanent', 'per',
  378. # sympy.geometry
  379. 'Point', 'Point2D', 'Point3D', 'Line', 'Ray', 'Segment', 'Line2D',
  380. 'Segment2D', 'Ray2D', 'Line3D', 'Segment3D', 'Ray3D', 'Plane', 'Ellipse',
  381. 'Circle', 'Polygon', 'RegularPolygon', 'Triangle', 'rad', 'deg',
  382. 'are_similar', 'centroid', 'convex_hull', 'idiff', 'intersection',
  383. 'closest_points', 'farthest_points', 'GeometryError', 'Curve', 'Parabola',
  384. # sympy.utilities
  385. 'flatten', 'group', 'take', 'subsets', 'variations', 'numbered_symbols',
  386. 'cartes', 'capture', 'dict_merge', 'prefixes', 'postfixes', 'sift',
  387. 'topological_sort', 'unflatten', 'has_dups', 'has_variety', 'reshape',
  388. 'rotations', 'filldedent', 'lambdify', 'source', 'threaded', 'xthreaded',
  389. 'public', 'memoize_property', 'timed',
  390. # sympy.integrals
  391. 'integrate', 'Integral', 'line_integrate', 'mellin_transform',
  392. 'inverse_mellin_transform', 'MellinTransform', 'InverseMellinTransform',
  393. 'laplace_transform', 'inverse_laplace_transform', 'LaplaceTransform',
  394. 'InverseLaplaceTransform', 'fourier_transform',
  395. 'inverse_fourier_transform', 'FourierTransform',
  396. 'InverseFourierTransform', 'sine_transform', 'inverse_sine_transform',
  397. 'SineTransform', 'InverseSineTransform', 'cosine_transform',
  398. 'inverse_cosine_transform', 'CosineTransform', 'InverseCosineTransform',
  399. 'hankel_transform', 'inverse_hankel_transform', 'HankelTransform',
  400. 'InverseHankelTransform', 'singularityintegrate',
  401. # sympy.tensor
  402. 'IndexedBase', 'Idx', 'Indexed', 'get_contraction_structure',
  403. 'get_indices', 'shape', 'MutableDenseNDimArray', 'ImmutableDenseNDimArray',
  404. 'MutableSparseNDimArray', 'ImmutableSparseNDimArray', 'NDimArray',
  405. 'tensorproduct', 'tensorcontraction', 'tensordiagonal', 'derive_by_array',
  406. 'permutedims', 'Array', 'DenseNDimArray', 'SparseNDimArray',
  407. # sympy.parsing
  408. 'parse_expr',
  409. # sympy.calculus
  410. 'euler_equations', 'singularities', 'is_increasing',
  411. 'is_strictly_increasing', 'is_decreasing', 'is_strictly_decreasing',
  412. 'is_monotonic', 'finite_diff_weights', 'apply_finite_diff',
  413. 'differentiate_finite', 'periodicity', 'not_empty_in',
  414. 'AccumBounds', 'is_convex', 'stationary_points', 'minimum', 'maximum',
  415. # sympy.algebras
  416. 'Quaternion',
  417. # sympy.printing
  418. 'pager_print', 'pretty', 'pretty_print', 'pprint', 'pprint_use_unicode',
  419. 'pprint_try_use_unicode', 'latex', 'print_latex', 'multiline_latex',
  420. 'mathml', 'print_mathml', 'python', 'print_python', 'pycode', 'ccode',
  421. 'print_ccode', 'glsl_code', 'print_glsl', 'cxxcode', 'fcode',
  422. 'print_fcode', 'rcode', 'print_rcode', 'jscode', 'print_jscode',
  423. 'julia_code', 'mathematica_code', 'octave_code', 'rust_code', 'print_gtk',
  424. 'preview', 'srepr', 'print_tree', 'StrPrinter', 'sstr', 'sstrrepr',
  425. 'TableForm', 'dotprint', 'maple_code', 'print_maple_code',
  426. # sympy.plotting
  427. 'plot', 'textplot', 'plot_backends', 'plot_implicit', 'plot_parametric',
  428. # sympy.interactive
  429. 'init_session', 'init_printing', 'interactive_traversal',
  430. # sympy.testing
  431. 'test', 'doctest',
  432. ]
  433. #===========================================================================#
  434. # #
  435. # XXX: The names below were importable before SymPy 1.6 using #
  436. # #
  437. # from sympy import * #
  438. # #
  439. # This happened implicitly because there was no __all__ defined in this #
  440. # __init__.py file. Not every package is imported. The list matches what #
  441. # would have been imported before. It is possible that these packages will #
  442. # not be imported by a star-import from sympy in future. #
  443. # #
  444. #===========================================================================#
  445. __all__.extend((
  446. 'algebras',
  447. 'assumptions',
  448. 'calculus',
  449. 'concrete',
  450. 'discrete',
  451. 'external',
  452. 'functions',
  453. 'geometry',
  454. 'interactive',
  455. 'multipledispatch',
  456. 'ntheory',
  457. 'parsing',
  458. 'plotting',
  459. 'polys',
  460. 'printing',
  461. 'release',
  462. 'strategies',
  463. 'tensor',
  464. 'utilities',
  465. ))