hash stringlengths 64 64 | content stringlengths 0 1.51M |
|---|---|
ff38ad909bd7cb5d914d00fa28895712b993a632d4d085147dcdfae6c66cc46c | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.utility_function import (Set, With, Module,
Scan, MapAnd, FalseQ,... |
ca342afb327a38980dda89bd0517abd5524a0d058a87e07d221168252a0a0241 | '''
Tests for Rubi Algebraic 1.2 rules. Parsed from Maple syntax
All tests: http://www.apmaths.uwo.ca/~arich/IntegrationProblems/MapleSyntaxFiles/MapleSyntaxFiles.html
Note: Some tests are commented since they depend rules other than Algebraic1.2.
'''
import sys
from sympy.external import import_module
matchpy = impor... |
df7e476d37696af420c1cb6bdfefd513857bb760cb670efa2fa01c4c51215121 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.rubimain import rubi_integrate
from sympy.functions import log, sqrt,... |
177f66b9b8da0137809b8ab606e9a2ddc2672d40e376cbca4ef2bdde3f079884 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.rubimain import rubi_integrate
from sympy.functions import log, sqrt,... |
4c23aa0161f7f5b11e4c7e042c306e5e3f198871dea6af6713f050df44d2b0fd | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.utility_function import (
sympy_op_factory, Int, Sum, Set, Wi... |
a0433854e4c7fc2bc255d58396f97cddf203524e79ece3c10a762440045d7eb9 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.rubimain import rubi_integrate
from sympy.functions import log, sqrt,... |
19e48f8bf13adff8c7b8be60bc0da118449f1bbd70d73d39e63b1c51d19e7230 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.rubimain import rubi_integrate
from sympy.functions import log, sqrt,... |
7ec6296ee65adc30d6bf67204c47ca05b2de818da92be6df09b7585d63d8768b | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.utility_function import (
sympy_op_factory, Int, Sum, Set, Wi... |
075f332a1671e701781092ca748017bd9df4919f99fc66e422c1344da75c1329 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.rubimain import rubi_integrate
from sympy.functions import log, sqrt,... |
cdd6834e34d61e897fd40e65f6fddc81801d38938a8b67887b94423927dccd54 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.utility_function import (
sympy_op_factory, Int, Sum, Set, Wi... |
8ffed12ae3d960494eee372ccde5a0bbee4150a550ebcaa1d7b3dae1e628021f | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.rubimain import rubi_integrate
from sympy.functions import log, sqrt,... |
956d57f8cb810af076c65678a028d919fba770fa13ee8f4b467b15b8d742c979 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
if matchpy:
from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match
from sympy.integrals.rubi.utility_function import... |
da062ff073a690245ab07b0a25f3be83b94869f9b46f98ebb127cccc45fb8542 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.utility_function import (
sympy_op_factory, Int, Sum, Set, Wi... |
cbc4f9e81003123f13126be47639bb79f609062a604a468e149919731f3a2468 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.utility_function import (
sympy_op_factory, Int, Sum, Set, Wi... |
f5e36bffc8d3297d1e6a5e64088a7d9638934124b59aa123585582eca4c78310 | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.utility_function import (
sympy_op_factory, Int, Sum, Set, Wi... |
1cc4d79aec35a133215e5e984c82b726561579504263e16bde5ba6ac46034079 | from sympy.assumptions.refine import refine
from sympy.concrete.summations import Sum
from sympy.core.add import Add
from sympy.core.basic import Basic
from sympy.core.containers import Tuple
from sympy.core.expr import (ExprBuilder, unchanged, Expr,
UnevaluatedExpr)
from sympy.core.function import (Function, expan... |
e9b05abc384941d0a8861a9c6ce4dec9ddf40e1acd50edf260cf855de21b1c4f | """Test whether all elements of cls.args are instances of Basic. """
# NOTE: keep tests sorted by (module, class name) key. If a class can't
# be instantiated, add it here anyway with @SKIP("abstract class) (see
# e.g. Function).
import os
import re
from sympy.assumptions.ask import Q
from sympy.core.basic import Ba... |
704fac0f23a172288e4854066850cfb8fb83219b9e3c14683fed746b8ac42005 | from sympy.core.logic import fuzzy_and
from sympy.core.sympify import _sympify
from sympy.multipledispatch import dispatch
from sympy.testing.pytest import XFAIL, raises, warns_deprecated_sympy
from sympy.assumptions.ask import Q
from sympy.core.add import Add
from sympy.core.basic import Basic
from sympy.core.expr imp... |
a5cff47dccac05a8fdddce622d6f7fa4864ba7a02d79576ea82ae1462bb2052c | from sympy.core.add import Add
from sympy.core.containers import Tuple
from sympy.core.function import (Function, Lambda)
from sympy.core.mul import Mul
from sympy.core.numbers import (Float, I, Integer, Rational, pi)
from sympy.core.power import Pow
from sympy.core.singleton import S
from sympy.core.symbol import Symb... |
d9ec03e00a3d71836f6edd9300877ca19094d0608d5ac483c78a8ee7efd78707 | from sympy import abc
from sympy.concrete.summations import Sum
from sympy.core.add import Add
from sympy.core.function import (Derivative, Function, diff)
from sympy.core.mul import Mul
from sympy.core.numbers import (Float, I, Integer, Rational, oo, pi)
from sympy.core.singleton import S
from sympy.core.symbol import... |
898366b844e3bde1c15693b2c32bff8d2b505a41707f51ae1018e8654561c4ae | """Tests of tools for setting up interactive IPython sessions. """
from sympy.interactive.session import (init_ipython_session,
enable_automatic_symbols, enable_automatic_int_sympification)
from sympy.core import Symbol, Rational, Integer
from sympy.external import import_module
from sympy.testing.pytest import r... |
33755418e0e1dcc2c495e3e362d8edf5bd3645e313870f975e9b904e4a2180db | """
Rational number type based on Python integers.
The PythonRational class from here has been moved to
sympy.external.pythonmpq
This module is just left here for backwards compatibility.
"""
from sympy.core.numbers import Rational
from sympy.core.sympify import _sympy_converter
from sympy.utilities import public
f... |
7cc294dd6c1df977e7d1f82b8dd3232fa06be835624a30d5a89f06f008b5aca9 | # coding=utf-8
from os import walk, sep, pardir
from os.path import split, join, abspath, exists, isfile
from glob import glob
import re
import random
import ast
from sympy.testing.pytest import raises
from sympy.testing.quality_unicode import _test_this_file_encoding
# System path separator (usually slash or backsla... |
bcf647015a83075fabe368581f73fcc6bc89eab8c520213bade1fe5ae2ee659c | from sympy.core.numbers import (Float, Rational, oo, pi)
from sympy.core.relational import Eq
from sympy.core.singleton import S
from sympy.core.symbol import (Symbol, symbols)
from sympy.functions.elementary.miscellaneous import sqrt
from sympy.functions.elementary.trigonometric import (acos, cos, sin)
from sympy.sets... |
659bf642cbe92a7c983b1d33e5fb8c3917e0f8b0e93c1eb69e21edd9aa7d6db5 | from sympy.core.basic import Basic
from sympy.core.numbers import (I, Rational, pi)
from sympy.core.parameters import evaluate
from sympy.core.singleton import S
from sympy.core.symbol import Symbol
from sympy.core.sympify import sympify
from sympy.functions.elementary.miscellaneous import sqrt
from sympy.geometry impo... |
9cc84fe4d8d05737c2f35116eb13cd13bf84b8be04f8231955bfe5b1bf6b7406 | # -*- coding: utf-8 -*-
import sys
from sympy.assumptions import Q
from sympy.core import Symbol, Function, Float, Rational, Integer, I, Mul, Pow, Eq
from sympy.functions import exp, factorial, factorial2, sin
from sympy.logic import And
from sympy.series import Limit
from sympy.testing.pytest import raises, skip
f... |
33adf4a113c5798c9493f6dbf4c0bf65aecae5215a1dffb3de77ba3569d38ee2 | # Ported from latex2sympy by @augustt198
# https://github.com/augustt198/latex2sympy
# See license in LICENSE.txt
import sympy
from sympy.external import import_module
from sympy.printing.str import StrPrinter
from sympy.physics.quantum.state import Bra, Ket
from .errors import LaTeXParsingError
LaTeXParser = LaTeX... |
3cb033171fefd08b5946f90b0695977dc5464001a5b11fcea747094b7ff51e25 | from sympy.core.numbers import I
from sympy.functions.elementary.exponential import (exp, log)
from sympy.polys.partfrac import apart
from sympy.core.symbol import Dummy
from sympy.external import import_module
from sympy.functions import arg, Abs
from sympy.integrals.transforms import _fast_inverse_laplace
from sympy.... |
d85fd7497cca2ed0d09bd2e468635fd950063bd0ef05af456d998006fdc3d701 | from sympy.core.backend import zeros, Matrix, diff, eye
from sympy.core.sorting import default_sort_key
from sympy.physics.vector import (ReferenceFrame, dynamicsymbols,
partial_velocity)
from sympy.physics.mechanics.method import _Methods
from sympy.physics.mechanics.particle import P... |
66a63f9719d9cbf63057c19900db84a14da8c065a0b8ab9318aff20a8b498e33 | # isort:skip_file
"""
Dimensional analysis and unit systems.
This module defines dimension/unit systems and physical quantities. It is
based on a group-theoretical construction where dimensions are represented as
vectors (coefficients being the exponents), and units are defined as a dimension
to which we added a scale... |
732b34b561a2d5508f58c4d9b8a69d70dfdb4e8cff6ea2ac0c7484573b95dc21 | """
**Contains**
* Medium
"""
from sympy.physics.units import second, meter, kilogram, ampere
__all__ = ['Medium']
from sympy.core.basic import Basic
from sympy.core.symbol import Str
from sympy.core.sympify import _sympify
from sympy.functions.elementary.miscellaneous import sqrt
from sympy.physics.units import spe... |
acdb2fa9b1fd19623704c54d204537d5fdcbcb00c72a4530d6afc4e3bd37f3a8 | from sympy.core.numbers import I
from sympy.core.symbol import Dummy
from sympy.functions.elementary.complexes import (Abs, arg)
from sympy.functions.elementary.exponential import log
from sympy.abc import s, p, a
from sympy.external import import_module
from sympy.physics.control.control_plots import \
(pole_zero_... |
359967e816f06ad1d20b6d3c480e735e1e720a3b7e100d4de4f83a72ff389ab6 | from sympy.core.backend import (cos, expand, Matrix, sin, symbols, tan, sqrt, S,
zeros)
from sympy.simplify.simplify import simplify
from sympy.physics.mechanics import (dynamicsymbols, ReferenceFrame, Point,
RigidBody, KanesMethod, inertia, Particle,... |
cb5a5a7e59006feef6d9c3ed67b3e4bf605b1c522d9b6885435e0eaa70fd4d2b | from .unit_definitions import (
percent, percents,
permille,
rad, radian, radians,
deg, degree, degrees,
sr, steradian, steradians,
mil, angular_mil, angular_mils,
m, meter, meters,
kg, kilogram, kilograms,
s, second, seconds,
A, ampere, amperes,
K, kelvin, kelvins,
mol, ... |
ffda17253c1649801fe8e5a37f6e6782ec2f01fa42018be96c723861aee4d120 | from sympy.physics.units.definitions.dimension_definitions import current, temperature, amount_of_substance, \
luminous_intensity, angle, charge, voltage, impedance, conductance, capacitance, inductance, magnetic_density, \
magnetic_flux, information
from sympy.core.numbers import (Rational, pi)
from sympy.cor... |
fafbe108abc844d14f296ff3754f6211d2f5aa1a89c1fda78262368e7648d85a | import warnings
from sympy.core.add import Add
from sympy.core.function import (Function, diff)
from sympy.core.numbers import (Number, Rational)
from sympy.core.singleton import S
from sympy.core.symbol import (Symbol, symbols)
from sympy.functions.elementary.complexes import Abs
from sympy.functions.elementary.expon... |
4711bb3779739823bff212282b23e70ca7df9a4f1017303dc9a9aed7f9abfdd1 | from sympy.functions.elementary.miscellaneous import sqrt
from sympy.physics.optics import Medium
from sympy.abc import epsilon, mu, n
from sympy.physics.units import speed_of_light, u0, e0, m, kg, s, A
from sympy.testing.pytest import raises
c = speed_of_light.convert_to(m/s)
e0 = e0.convert_to(A**2*s**4/(kg*m**3))
... |
ac10478c9214036a11f37520109fc620048359f4d95c3cce96599c3bdd176035 | from sympy.tensor.functions import TensorProduct
from sympy.matrices.dense import Matrix
from sympy.matrices.expressions.matexpr import MatrixSymbol
from sympy.tensor.array import Array
from sympy.abc import x, y, z
from sympy.abc import i, j, k, l
A = MatrixSymbol("A", 3, 3)
B = MatrixSymbol("B", 3, 3)
C = MatrixSym... |
7ee75b5c1f2c6389f5e29994dd7cee8b5443aa1a633573f6cd3bc6a0696239bf | import itertools
from collections import defaultdict
from typing import Tuple as tTuple, Union as tUnion, FrozenSet, Dict as tDict, List, Optional
from functools import singledispatch
from itertools import accumulate
from sympy import MatMul, Basic, Wild, KroneckerProduct
from sympy.assumptions.ask import (Q, ask)
fro... |
c8863546ea45f7e1555778d92eca96c59d5c928135f87910c8cf1c4089b8fc6b | from sympy import KroneckerProduct
from sympy.core.basic import Basic
from sympy.core.function import Lambda
from sympy.core.mul import Mul
from sympy.core.numbers import Integer
from sympy.core.power import Pow
from sympy.core.singleton import S
from sympy.core.symbol import (Dummy, symbols)
from sympy.matrices.expres... |
358e653b7dc650bd722c318007cfdce5dd6fa4b8b2f6b9015fd34401cfc7327b | import operator
from collections import defaultdict, Counter
from functools import reduce
import itertools
from itertools import accumulate
from typing import Optional, List, Dict as tDict, Tuple as tTuple
import typing
from sympy import Integer, KroneckerDelta, Equality
from sympy.core.basic import Basic
from sympy.... |
2def2bffee978b9b0ff9d0a49c234da2a44d35eb4fef554b383fe78167bfbdb3 | import operator
from functools import reduce, singledispatch
from sympy.core.expr import Expr
from sympy.core.singleton import S
from sympy.matrices.expressions.hadamard import HadamardProduct
from sympy.matrices.expressions.inverse import Inverse
from sympy.matrices.expressions.matexpr import (MatrixExpr, MatrixSymbo... |
447911cd60c00f42fdd7c46d165d95a02bd31a20ff82808c55bc8da0ce5670b9 | from sympy import Lambda, S, Dummy, KroneckerProduct
from sympy.core.symbol import symbols
from sympy.functions.elementary.miscellaneous import sqrt
from sympy.functions.elementary.trigonometric import cos, sin
from sympy.matrices.expressions.hadamard import HadamardProduct, HadamardPower
from sympy.matrices.expression... |
f3f7b1b12349be4ccfbe210638dc1ee7b1c89ade4e4a9e6ed0df33344647a063 | from sympy import Lambda, KroneckerProduct
from sympy.core.symbol import symbols, Dummy
from sympy.matrices.expressions.hadamard import (HadamardPower, HadamardProduct)
from sympy.matrices.expressions.inverse import Inverse
from sympy.matrices.expressions.matexpr import MatrixSymbol
from sympy.matrices.expressions.matp... |
9171c6cf1d51e079aea1b6bc2ee373fba347718456c87ebe47a572bb1b589281 | import random
from sympy import tensordiagonal, eye, KroneckerDelta, Array
from sympy.core.symbol import symbols
from sympy.functions.elementary.trigonometric import (cos, sin)
from sympy.matrices.expressions.diagonal import DiagMatrix
from sympy.matrices.expressions.matexpr import MatrixSymbol
from sympy.matrices.exp... |
9690b8972e8c24b0d105c56ddc670fdc7ea47bd6c8fa8dd550bc34c7217941b6 | from sympy.core.symbol import symbols
from sympy.functions.elementary.trigonometric import (cos, sin)
from sympy.matrices.expressions.matexpr import MatrixSymbol
from sympy.matrices.expressions.special import Identity
from sympy.matrices.expressions.applyfunc import ElementwiseApplyFunction
from sympy.tensor.array.expr... |
0b7d05621e96d2045da9cc57670c7ad71aade8e1f86bebc600625dd367975e04 | from sympy.assumptions.ask import Q
from sympy.assumptions.refine import refine
from sympy.core.numbers import oo
from sympy.core.relational import Equality, Eq, Ne
from sympy.core.singleton import S
from sympy.core.symbol import (Dummy, symbols)
from sympy.functions import Piecewise
from sympy.functions.elementary.tri... |
7b9532a94724f51e12956cd5d3034965853bbcc1c5b8cf53df5f2cde997058fe | """
Some examples have been taken from:
http://www.math.uwaterloo.ca/~hwolkowi//matrixcookbook.pdf
"""
from sympy import KroneckerProduct
from sympy.combinatorics import Permutation
from sympy.concrete.summations import Sum
from sympy.core.numbers import Rational
from sympy.core.singleton import S
from sympy.core.symb... |
f38377748baceebd3d5d5ecf17f462129151c35cb9b4e183df858acd233d17ee | from sympy.core import Basic, Expr
from sympy.core.function import Lambda
from sympy.core.numbers import oo, Infinity, NegativeInfinity, Zero, Integer
from sympy.core.singleton import S
from sympy.core.symbol import symbols
from sympy.functions.elementary.miscellaneous import (Max, Min)
from sympy.sets.fancysets import... |
412b2e432df13e54b58f3135a087e41f5e5e3866976b66f02376232a72d57f3b | from sympy.core.function import Lambda, expand_complex
from sympy.core.mul import Mul
from sympy.core.numbers import ilcm
from sympy.core.relational import Eq
from sympy.core.singleton import S
from sympy.core.symbol import (Dummy, symbols)
from sympy.core.sorting import ordered
from sympy.sets.fancysets import Complex... |
fee705bf1b83bfdc2c98ac469020d4111b5893723fb50c63663637664ae85acd | from sympy.core.numbers import oo, Infinity, NegativeInfinity
from sympy.core.singleton import S
from sympy.core import Basic, Expr
from sympy.multipledispatch import Dispatcher
from sympy.sets import Interval, FiniteSet
# XXX: The functions in this module are clearly not tested and are broken in a
# number of ways.... |
15dba35b5e1cd399bd889377fa8d8643fec6da20c4f627c5614c4ae142d8cbe5 | from sympy.core.singleton import S
from sympy.core.sympify import sympify
from sympy.sets.sets import (EmptySet, FiniteSet, Intersection,
Interval, ProductSet, Set, Union, UniversalSet)
from sympy.sets.fancysets import (ComplexRegion, Naturals, Naturals0,
Integers, Rationals, Reals)
from sympy.multipledispatch ... |
8d8485a85347ea65db2853e0bc8008198f0185b2cfa35740bdc360e0cc6609a2 | from sympy.core.singleton import S
from sympy.sets.sets import Set
from sympy.calculus.singularities import singularities
from sympy.core import Expr, Add
from sympy.core.function import Lambda, FunctionClass, diff, expand_mul
from sympy.core.numbers import Float, oo
from sympy.core.symbol import Dummy, symbols, Wild
f... |
6b391aff978e694ae8debdefef63e6113d2863cf9a6a8264cd510aee4baa5c20 | from sympy.core.singleton import S
from sympy.core.symbol import Symbol
from sympy.core.logic import fuzzy_and, fuzzy_bool, fuzzy_not, fuzzy_or
from sympy.core.relational import Eq
from sympy.sets.sets import FiniteSet, Interval, Set, Union, ProductSet
from sympy.sets.fancysets import Complexes, Reals, Range, Rationals... |
5c56e43b0e0f0d0ba668e1149477902ef8e12289b47f78a789262ffca6aefb1c | from sympy.core import Basic, Expr
from sympy.core.numbers import oo
from sympy.core.symbol import symbols
from sympy.multipledispatch import Dispatcher
from sympy.sets.setexpr import set_mul
from sympy.sets.sets import Interval, Set
_x, _y = symbols("x y")
_set_mul = Dispatcher('_set_mul')
_set_div = Dispatcher('_... |
18d3246df33abce22aaeb6a1273f302e5ed013dc7e8ce594694b18ee79113de5 | from sympy.concrete.summations import Sum
from sympy.core.add import Add
from sympy.core.function import Lambda
from sympy.core.numbers import (Float, I, Rational, nan, oo, pi, zoo)
from sympy.core.power import Pow
from sympy.core.singleton import S
from sympy.core.symbol import (Symbol, symbols)
from sympy.core.sympif... |
e5ba02d85926938ebe8161aa5b375390f99330d1c73a90340a707dabde3a1f07 | from time import perf_counter
import pyglet.gl as pgl
from sympy.plotting.pygletplot.managed_window import ManagedWindow
from sympy.plotting.pygletplot.plot_camera import PlotCamera
from sympy.plotting.pygletplot.plot_controller import PlotController
class PlotWindow(ManagedWindow):
def __init__(self, plot, a... |
f15a2df14b1373a3176b125f88540b852ea0b91b459a988d04158dacbb62a58a | #!/usr/bin/env python
"""Distutils based setup script for SymPy.
This uses Distutils (https://python.org/sigs/distutils-sig/) the standard
python mechanism for installing packages. Optionally, you can use
Setuptools (https://setuptools.readthedocs.io/en/latest/)
to automatically handle dependencies. For the easiest in... |
914b7fa711027a28e15bcd6ca8a37dc0060ee8cd1e12b658ffe2810c7d7e275c | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A tool to generate AUTHORS. We started tracking authors before moving to git,
so we have to do some manual rearrangement of the git history authors in order
to get the order in AUTHORS. bin/mailmap_check.py should be run before
committing the results.
See here for inst... |
3e01690453fd756778f006d02b418066e98b5702a05a3804639896c041ccc7fa | #!/usr/bin/env python
import os
import json
from subprocess import check_output
from collections import OrderedDict, defaultdict
from collections.abc import Mapping
import glob
from contextlib import contextmanager
import requests
from requests_oauthlib import OAuth2
def main(version, push=None):
"""
WARNIN... |
abc0d5072086d044d0a72e07da10ac71f49bc233a7b9e497fb0cd627a4ecdd44 | #!/usr/bin/env python3
import os
from pathlib import Path
from subprocess import check_output
import unicodedata
def main(version, prevversion, outdir):
"""
Print authors text to put at the bottom of the release notes
"""
outdir = Path(outdir)
authors, authorcount, newauthorcount = get_authors(ve... |
66953c3ad451e0fecb0d516f6a5fb525e1cf5b6f9131d83dcdc6bf2377e0cda1 | #!/usr/bin/env python3
from os.path import join, basename, normpath
from subprocess import check_call
def main(version, prevversion, outdir):
check_version(version, outdir)
run_stage(['bin/mailmap_check.py', '--update-authors'])
run_stage(['mkdir', '-p', outdir])
build_release_files('bdist_wheel', 'sy... |
7b1c682ce2143ec1e4b8f7967d264864ccf8e3db929b2a8315777766f1179d75 | #!/usr/bin/env python3
from subprocess import check_output
import sys
import os.path
def main(tarname, gitroot):
"""Run this as ./compare_tar_against_git.py TARFILE GITROOT
Args
====
TARFILE: Path to the built sdist (sympy-xx.tar.gz)
GITROOT: Path ro root of git (dir containing .git)
"""
... |
2a339ea1920916014ad39fb938207a2643d7735b65c1ff66f9206a4dc9b9add6 | """
SymPy is a Python library for symbolic mathematics. It aims to become a
full-featured computer algebra system (CAS) while keeping the code as simple
as possible in order to be comprehensible and easily extensible. SymPy is
written entirely in Python. It depends on mpmath, and other external libraries
may be option... |
0016f6df12d1c936c34d5a4c17022bd8ef29f87b03f4d665c43d6cb526fc7e59 | __version__ = "1.11.dev"
|
85f8d08246eb3dbe61b0bf909acee460c2f89308b358b268140cee612eb95f55 | #!/usr/bin/env python
"""Matplotlib 2D plotting example
Demonstrates plotting with matplotlib.
"""
import sys
from sample import sample
from sympy import sqrt, Symbol
from sympy.utilities.iterables import is_sequence
from sympy.external import import_module
def mplot2d(f, var, *, show=True):
"""
Plot a 2... |
caa6fcbd1132bc892780705a3402d82193d829de0e6bcaba1c2256949f13f404 | #
# SymPy documentation build configuration file, created by
# sphinx-quickstart.py on Sat Mar 22 19:34:32 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are... |
7dd094998411a88c6d803ffb63bee4121017e06f520bb2340b80c4117d2cfa65 | """
Continuous Random Variables - Prebuilt variables
Contains
========
Arcsin
Benini
Beta
BetaNoncentral
BetaPrime
BoundedPareto
Cauchy
Chi
ChiNoncentral
ChiSquared
Dagum
Erlang
ExGaussian
Exponential
ExponentialPower
FDistribution
FisherZ
Frechet
Gamma
GammaInverse
Gumbel
Gompertz
Kumaraswamy
Laplace
Levy
LogCauchy
L... |
22591fdf0e907ae3663a9dea126f66abaf8a8dc4bb2e1237a4d8ce390ec7fa5c | """
Finite Discrete Random Variables - Prebuilt variable types
Contains
========
FiniteRV
DiscreteUniform
Die
Bernoulli
Coin
Binomial
BetaBinomial
Hypergeometric
Rademacher
IdealSoliton
RobustSoliton
"""
from sympy.core.cache import cacheit
from sympy.core.function import Lambda
from sympy.core.numbers import (Integ... |
81f0e752e002fc217809034841f0664d7757b0498ed9d75eda9f5d95fea12ad1 | import random
import itertools
from typing import (Sequence as tSequence, Union as tUnion, List as tList,
Tuple as tTuple, Set as tSet)
from sympy.concrete.summations import Sum
from sympy.core.add import Add
from sympy.core.basic import Basic
from sympy.core.cache import cacheit
from sympy.core.containers impo... |
68db3f7627e64f0eded8621f2c668f2e94be99796db6bac1dd35453c349d1b05 | """
SymPy statistics module
Introduces a random variable type into the SymPy language.
Random variables may be declared using prebuilt functions such as
Normal, Exponential, Coin, Die, etc... or built with functions like FiniteRV.
Queries on random expressions can be made using the functions
======================... |
7f3a880c47198fac385bd59bb9e696bfe5f752bb51fa91bcf8295a1152f48390 | from sympy.concrete.products import Product
from sympy.concrete.summations import Sum
from sympy.core.add import Add
from sympy.core.function import Lambda
from sympy.core.mul import Mul
from sympy.core.numbers import (Integer, Rational, pi)
from sympy.core.power import Pow
from sympy.core.relational import Eq
from sym... |
32db35bef9441e831d36d09f1f4fb31b3485f4028bc8f8076d3f364c4f99920f | """
Contains
========
FlorySchulz
Geometric
Hermite
Logarithmic
NegativeBinomial
Poisson
Skellam
YuleSimon
Zeta
"""
from sympy.concrete.summations import Sum
from sympy.core.basic import Basic
from sympy.core.function import Lambda
from sympy.core.numbers import I
from sympy.core.relational import Eq
from sympy.cor... |
196774a055ab8f6030cfbf22675e9120f5be531d74cf47bfd81d4b94c12ae521 | """
Main Random Variables Module
Defines abstract random variable type.
Contains interfaces for probability space object (PSpace) as well as standard
operators, P, E, sample, density, where, quantile
See Also
========
sympy.stats.crv
sympy.stats.frv
sympy.stats.rv_interface
"""
from functools import singledispatch... |
32e2cdb7ff64f0768996b7ec3010a03efc38a7ff200ee8772f33fb26ae884e7c | """
Generating and counting primes.
"""
import random
from bisect import bisect
from itertools import count
# Using arrays for sieving instead of lists greatly reduces
# memory consumption
from array import array as _array
from sympy.core.function import Function
from sympy.core.singleton import S
from .primetest im... |
a4ae3be21cae07bd1ff5cddecffc73d1b9cc6252db8a7ec88c989c400c9b706c | from sympy.ntheory import sieve, isprime
from sympy.core.numbers import mod_inverse
from sympy.core.power import integer_log
from sympy.utilities.misc import as_int
import random
rgen = random.Random()
#----------------------------------------------------------------------------#
# ... |
956676ab7960bd6a8aaeaefd0fcd4f72fb82e42b3a9061d20cb257c30441d9b3 | from sympy.core.function import Function
from sympy.core.numbers import igcd, igcdex, mod_inverse
from sympy.core.power import isqrt
from sympy.core.singleton import S
from sympy.polys import Poly
from sympy.polys.domains import ZZ
from sympy.polys.galoistools import gf_crt1, gf_crt2, linear_congruence
from .primetest ... |
2747af33c9f9652b2611fd8caf0ca9e27a40476164fe8b4e75f2c62ad8ac107a | """
Primality testing
"""
from sympy.core.numbers import igcd
from sympy.core.power import integer_nthroot
from sympy.core.sympify import sympify
from sympy.external.gmpy import HAS_GMPY
from sympy.utilities.misc import as_int
from mpmath.libmp import bitcount as _bitlength
def _int_tuple(*i):
return tuple(int... |
3d525836e098b8263459094af6bc807511a3bfcd73ea320c22309bfff1345deb | from sympy.core.exprtools import factor_terms
from sympy.core.numbers import Integer, Rational
from sympy.core.singleton import S
from sympy.core.symbol import Dummy
from sympy.core.sympify import _sympify
from sympy.utilities.misc import as_int
def continued_fraction(a):
"""Return the continued fraction represen... |
2b9933797ef12e7c74af6d1d7b4511f6a293701789c108275fb99ccd1cd0fb04 | from sympy.core.numbers import igcd, mod_inverse
from sympy.core.power import integer_nthroot
from sympy.ntheory.residue_ntheory import _sqrt_mod_prime_power
from sympy.ntheory import isprime
from math import log, sqrt
import random
rgen = random.Random()
class SievePolynomial:
def __init__(self, modified_coeff=(... |
d8a85eeb2707ed4889f3e0266cbc87a384564b1c3e52fcbd7d730555d8449681 | """
Integer factorization
"""
from collections import defaultdict
from functools import reduce
import random
import math
from sympy.core import sympify
from sympy.core.containers import Dict
from sympy.core.evalf import bitcount
from sympy.core.expr import Expr
from sympy.core.function import Function
from sympy.core... |
e4bb392f4955302b2d42482b377b34585c0e5829586b2f642a7936d9758cb42c | from math import log
from itertools import chain, islice, product
from sympy.combinatorics import Permutation
from sympy.combinatorics.permutations import (_af_commutes_with, _af_invert,
_af_rmul, _af_rmuln, _af_pow, Cycle)
from sympy.combinatorics.util import (_check_cycles_alt_sym,
_distribute_gens_by_base,... |
7db9bfe4e49cc383211afde7ac40eec593cb638dd9f994750ed2a47bf65c18a7 | from sympy.core import Basic, Integer
import random
class GrayCode(Basic):
"""
A Gray code is essentially a Hamiltonian walk on
a n-dimensional cube with edge length of one.
The vertices of the cube are represented by vectors
whose values are binary. The Hamilton walk visits
each vertex exact... |
3e8f0b1dd20d0e8d19989441bc655ec9ff07147a86c4d7b645b8993cce202848 | from collections import deque
from sympy.combinatorics.rewritingsystem_fsm import StateMachine
class RewritingSystem:
'''
A class implementing rewriting systems for `FpGroup`s.
References
==========
.. [1] Epstein, D., Holt, D. and Rees, S. (1991).
The use of Knuth-Bendix methods to sol... |
3dfad67593dbf7c44df1e02d6bffe1a2b19a328fa7b2b4a5652fd685f1aa031c | import random
from collections import defaultdict
from collections.abc import Iterable
from functools import reduce
from sympy.core.parameters import global_parameters
from sympy.core.basic import Atom
from sympy.core.expr import Expr
from sympy.core.numbers import Integer
from sympy.core.sympify import _sympify
from ... |
f2c0f32791e2dbdfe54f432876b51d25715e010471a9a30d6dd1bb47ac0cb821 | from itertools import combinations
from sympy.combinatorics.graycode import GrayCode
class Subset():
"""
Represents a basic subset object.
Explanation
===========
We generate subsets using essentially two techniques,
binary enumeration and lexicographic enumeration.
The Subset class tak... |
0f1f716a4a47b93220cb81bccd58c063aa53bbc27dfcadddfe328f8b344c755a | from sympy.combinatorics.permutations import Permutation, Cycle
from sympy.combinatorics.prufer import Prufer
from sympy.combinatorics.generators import cyclic, alternating, symmetric, dihedral
from sympy.combinatorics.subsets import Subset
from sympy.combinatorics.partitions import (Partition, IntegerPartition,
RG... |
0c2d56263f8ea646160611bcc44211ce86d8a968f36a15ee09b275b736f547c5 | from typing import Dict as tDict, List
from sympy.core import S
from sympy.core.expr import Expr
from sympy.core.symbol import Symbol, symbols as _symbols
from sympy.core.sympify import CantSympify
from sympy.printing.defaults import DefaultPrinting
from sympy.utilities import public
from sympy.utilities.iterables imp... |
4e591ab16e0df719b9ec4f70bcfac3498df803ce1d4de791fd602219fdd1efd4 | from sympy.ntheory.primetest import isprime
from sympy.combinatorics.perm_groups import PermutationGroup
from sympy.printing.defaults import DefaultPrinting
from sympy.combinatorics.free_groups import free_group
class PolycyclicGroup(DefaultPrinting):
is_group = True
is_solvable = True
def __init__(self... |
18fcd5ebc0640eb5f4f513bae674ab95d6c88ec68fc1621fa1e23d162d6f4961 | from sympy.combinatorics import Permutation as Perm
from sympy.combinatorics.perm_groups import PermutationGroup
from sympy.core import Basic, Tuple, default_sort_key
from sympy.sets import FiniteSet
from sympy.utilities.iterables import (minlex, unflatten, flatten)
from sympy.utilities.misc import as_int
rmul = Perm.... |
6e59628e93527814b3b5c2fddcd7a12ff0a0abe020bfbfafeee7b0772f36f1f6 | import itertools
from sympy.combinatorics.fp_groups import FpGroup, FpSubgroup, simplify_presentation
from sympy.combinatorics.free_groups import FreeGroup
from sympy.combinatorics.perm_groups import PermutationGroup
from sympy.core.numbers import igcd
from sympy.ntheory.factor_ import totient
from sympy.core.singleton... |
cf31d9c79e4c5f8122d87cdd2e13f884e695ad97f61439d1aff1a8a3b6618332 | from sympy.core import Basic, Dict, sympify, Tuple
from sympy.core.numbers import Integer
from sympy.core.sorting import default_sort_key
from sympy.core.sympify import _sympify
from sympy.functions.combinatorial.numbers import bell
from sympy.matrices import zeros
from sympy.sets.sets import FiniteSet, Union
from symp... |
16a4b16ad16738ab3206f9f9d35ef60124e0899b3b18005d2a5736eeb5116fc4 | from sympy.combinatorics.permutations import Permutation, _af_invert, _af_rmul
from sympy.ntheory import isprime
rmul = Permutation.rmul
_af_new = Permutation._af_new
############################################
#
# Utilities for computational group theory
#
############################################
def _base_or... |
4612f7cabb197c10271025ff29526a99a3b339c4c92c43a8e354f613f5d116b5 | from sympy.combinatorics.free_groups import free_group
from sympy.printing.defaults import DefaultPrinting
from itertools import chain, product
from bisect import bisect_left
###############################################################################
# COSET TABLE ... |
42378210605f4c16cc65df96a42398e62114cadf0eede2576b74432df302ef09 | """Finitely Presented Groups and its algorithms. """
from sympy.core.singleton import S
from sympy.core.symbol import symbols
from sympy.combinatorics.free_groups import (FreeGroup, FreeGroupElement,
free_group)
from sympy.combinatorics.rewritingsystem import RewritingSy... |
20ef9aba38058354b1b5b04ff9d32315c05bc68e17451459c00b5a3a6e0fee6b | from typing import Tuple as tTuple
from .expr_with_intlimits import ExprWithIntLimits
from .summations import Sum, summation, _dummy_with_inherited_properties_concrete
from sympy.core.expr import Expr
from sympy.core.exprtools import factor_terms
from sympy.core.function import Derivative
from sympy.core.mul import Mu... |
be3e0f8edb41f7113969462edfb475038fcab4683170f6bae63ce3bfcfa4aec7 | from sympy.concrete.expr_with_limits import ExprWithLimits
from sympy.core.singleton import S
from sympy.core.relational import Eq
class ReorderError(NotImplementedError):
"""
Exception raised when trying to reorder dependent limits.
"""
def __init__(self, expr, msg):
super().__init__(
... |
c24ea80a374b2909a53ebb525ff5e68c2938a56f11b75ce4f94b4d6011b4b822 | """
This module implements sums and products containing the Kronecker Delta function.
References
==========
.. [1] http://mathworld.wolfram.com/KroneckerDelta.html
"""
from .products import product
from .summations import Sum, summation
from sympy.core import Add, Mul, S, Dummy
from sympy.core.cache import cacheit
f... |
deaf20919cffa0078138151f39b32fc00ac190129845e1d1d29ad55cc22aacd1 | """Gosper's algorithm for hypergeometric summation. """
from sympy.core import S, Dummy, symbols
from sympy.polys import Poly, parallel_poly_from_expr, factor
from sympy.utilities.iterables import is_sequence
def gosper_normal(f, g, n, polys=True):
r"""
Compute the Gosper's normal form of ``f`` and ``g``.
... |
fe9125a246ec3177db19be19e3fe6fc1a4bac8a49e5f845b706802d78136d56b | """Various algorithms for helping identifying numbers and sequences."""
from sympy.concrete.products import (Product, product)
from sympy.core import Function, S
from sympy.core.numbers import (Zero, Integer, Rational)
from sympy.core.symbol import Symbol, symbols
from sympy.core.sympify import sympify
from sympy.fun... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.