Up to [cvs.NetBSD.org] / pkgsrc / math / py-sympy
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
py-sympy: updated to 1.13.3 SymPy 1.13.3 Changes matrices Handle matrices of zero columns correctly in the Matrix constructor. In SymPy 1.12 these produced empty matrices of the wrong shape and in 1.13 they resulted in an error. Now Matrix([[], []]).shape == (2,0). physics.wigner NumPy numbers can be used with clebsch_gordan. Fixes a regression introduced in SymPy 1.13.0.
py-sympy: updated to 1.13.2 1.13.2 Bug fixes
py-sympy: updated to 1.13.1 1.13.1 matrices Matrix.inv() now uses exact rational coefficients internally for matrices of polynomials or rational functions if the matrix has symbolic expressions with float coefficients. This fixes an issue first seen in SymPy 1.13.0 where unnecessarily large floats were present in the expressions for the matrix inverse (https://github.com/sympy/sympy/issues/26821) and likely also prevents Matrix.inv from returning some inaccurate results for some matrices containing floats. physics.vector A bug in pretty printing of vectors was fixed. A regression in 1.13.0 means that an exception would be raised when printing the zero vector. polys Fix GF with Integer argument. A regression in 1.13.0 meant that when the ground types are flint GF(3)(Integer(2)) would raise an exception.
py-sympy: updated to 1.12.1 SymPy 1.12.1 The main changes are improved compatibility with NumPy 2.0 and CPython 3.12.
*: remove more references to Python 3.7
py-sympy: updated to 1.12 1.12 https://github.com/sympy/sympy/wiki/release-notes-for-1.12
py-sympy: updated to 1.11.1 1.11.1 Changes utilities The 1.11 release introduced a regression when using lambdify with the cse=True option (introduced in 1.9) resulting in a list being returned for a lambdified expression that was not a list. This bug is now fixed in the 1.11.1 release. 1.11.0 Better support for integrating several different types of expressions. The series expansion has seen several improvements. The assumption system is now fully deterministic, so it should work in multi-threaded environments. A new and improved Mathematica parser.
py-sympa: Remove man entries from ALTERNATIVES. pkg_alternatives does not support manual pages (it creates its own wrappers based on the binary names), and including them breaks upgrade rebuilds. Bump PKGREVISION.
python: egg.mk: add USE_PKG_RESOURCES flag This flag should be set for packages that import pkg_resources and thus need setuptools after the build step. Set this flag for packages that need it and bump PKGREVISION.
*: bump PKGREVISION for egg.mk users They now have a tool dependency on py-setuptools instead of a DEPENDS
py-sympy: updated to 1.9 1.9 Highlights The internal implementation of Matrix and other matrix classes (SparseMatrix etc) is now DomainMatrix. The ZZ and QQ domains are used for matrices with only integer or rational elements. Otherwise the new EXRAW domain is used. This should be backwards compatible although many internal methods and attributes are changed. At the time of this change the DomainMatrix routines are only used for addition and multiplication of matrices and some other simple low-level operations. Further changes will use DomainMatrix routines for operations like rref, det, lu etc and are expected to lead to big speedups for these computations. At this stage those big speedups are not realised but some basic operations such as indexing a matrix like M[0, 0] could potentially be slower. The new implementation can be much faster for most operations and is expected to lead to significant speed ups over the next few SymPy releases. Leading term methods now raise PoleError at singularities. There was a long-standing issue of incorrect handling of leading term at singularities, where earlier, for compatibility reasons, the original expression itself was incorrectly returned. exp(1/x).as_leading_term(x) returned exp(1/x), but it does not have any leading term as x->0, so an error must be raised. Note that leadterm used to throw a ValueError even in the previous implementation as the original expression depends on the symbol x. A few examples of functions where this change would be visible - Pow, exp, log, factorial and gamma.
py-sympy: updated to 1.8 1.8: Backwards compatibility breaks and deprecations Please manually add any backwards compatibility breaks or deprecations here, in addition to the automatic listing below. assumptions AskHandler(), register_handler() and remove_handler() are deprecated. Handler now must be multipledispatch instance. parsing Parsing of "Q" returns AssumptionKeys instance in assumptions module. This means that sympify("Q") will no longer return a symbol. Changes assumptions Q.infinite now correctly evaluates to True for oo, -oo, and zoo. Assumption predicates now correctly evaluates to None for S.NaN. Relational objects do not need to be wrapped by Q.is_true to be asked or refined anymore Q.is_true wrapping over AppliedPredicate now just return the argument. refine arg(x) when x is real and nonzero assumptions/relation module is introduced. This module implements binary relation as predicate. AskHandler(), register_handler() and remove_handler() are deprecated. Handler now must be multipledispatch instance. Predicate now uses a single handler which is multipledispatch instance. Predicate can now take multiple arguments. Predicate("...") now returns UndefinedPredicate instance. To define a predicate, you must make a subclass of Predicate. calculus Using maximum with a piecewise expression over a domain no longer fails due to a bug fix in Piecewise.as_expr_set_pairs. codegen allowing for multi-dimensional arrays as arguments/locals in c code generation create_expand_pow_optimization is now customizable with respect to requirement on base. Support flattening of elementwise additions of array expressions. Fixes to array-expressions in order to properly work with ZeroArray and ZeroMatrix. Fixing matrix expression recognition from array-expressions. Minor fixes to the way the AST of array expressions is built Add normalization of CodegenArrayDiagonal when it's nested with CodegenArrayPermuteDims and CodegenArrayContraction. Increased support for the normalization of array expressions and permutations of indices. parse_matrix_expression( ) is now able to parse traces of matrices. combinatorics Added a section to the permutation docs about containment in permutation groups. concrete Improved infinite summation capability by adding residue formula. A bug leading to incorrect evaluation of a summation of an exponential function was fixed. core Fixed a bug in Pow._eval_nseries that added Order terms to exact expansions Fixed a bug in Expr.round that could lead to infinite recursion in integrate. Removed deprecated ClassRegistry get_integer_part no longer has a threshold on the approximation to closest integer based on difference, allowing floor to give more accurate results for smaller evalf precisions also A bug causing match to fail for expressions with different signs was fixed. Previously this resulted in solve raising an exception for some inputs. Make S(0.0) == S.false return False .refine() method is moved from Expr to Basic. gcd correctly handles unevaluated Mul Fixed a bug leading to infinite recursion in the old assumptions under evaluate(False). Fixed _eval_is_zero() functionality when imaginary numbers are involved. Kind classification of objects is introduced. This feature is experimental, and can be replaced or deleted in the future. Make class Eq with sets as arguments work with simplify(). Fixed a few broken cases of expr.is_integer functions Implemented Riemann Xi function riemaan xi function Added nseries expansion for besselj and bessely Fixed leading term calculation of sin functions to handle angles outside (-pi, pi) Added aseries expansion to error functions Changes _eval_nseries of Abs to no longer return a Piecewise Modified _eval_nseries to handle infinity and added _eval_as_leading_term in floor and ceiling Added Generalized Incomplete, Generalized Regularized and Central Beta functions Added _eval_nseries support to sign Fixed assumption is_algebraic for exponentials with rational multiples of I*pi to be True. geometry Fix AssertError for vertical tangent Geometric entities with symbolic coordinates will not be printed in SVG. integrals Fixed a bug that led to RecursionError in integrals involving hyperbolic functions. The heurisch integration method was made faster by improvements in the sparse linear systems solver. A bug leading to incorrect results when integrating Piecewise expressions where a condition simplifies to True was fixed. logic simplify_logic faster in most cases, especially for larger expressions. refine() on Boolean objects reduces them to true or false if the truth value can be determined. matrices Fixed a bug that led to the wrong derivative result in matrix expressions. The eye and zero functions have been made much faster for large matrices. Added two new functions upper_triangular and lower_triangular, that return upper and lower triangular parts of a matrix. Minus one, integers, rational numbers multiplied with MatAdd is automatically distributed. Added function returning Wilkinson matrix Implemented Singular Value decomposition for matrices Implemented Upper Hessenberg Decomposition for a matrix eigenvals, eigenvects without radical solution will be returned as CRootOf Added function to calculate Generalized Schur Complement for Block Matrices Added functions to compute LDU, UDL and LU decompositions for Block Matrices Fixed issues with dot product for Matrix.orthogonalize with complex vectors. Fixed zero division issues for Matrix.QRdecomposition with zero columns coming first than nonzero columns. Added a function to compute the permanent of a matrix Changed behaviour of eq() of class DenseMatrix det has a new option 'gauss-ge' which is much faster in many cases ntheory Added documentation of ecm and qs functions Fixed a bug in the is_gaussian_prime function for python complex numbers (e.g. 1+1j). primerange now accepts a single argument i.e., primerange(input_arg) is valid and is same as primerange(2, input_arg). Added motzkin numbers parsing Fixed issue with parsing logarithm bases without curly braces Fix parse_expr parsing of expressions with methods when using the implicit_multiplications transformation. Include the transformed code in the error message when the evaluation in parse_expr fails. Extended the LaTeX parser with support for complex conjugates (via \overline{...}). Latex parser does not evaluate sqrt expressions anymore. physics.continuum_mechanics make beam module compute correctly internal forces physics.optics Fixed bugs related to basic operations on TWave physics.quantum WignerD now evaluates to KroneckerDelta in some cases. physics.units Fix bug when input argument to a function is an integer Change default behavior for functions (all function arguments must be dimensionless by default) sin, cos, tan, cot, sec, and csc functions may have a dimensionless or angle input argument Exponents must now be dimensionless Constants such as pi and E are now treated as dimensionless (raised exception previously) Numbers with an imaginary component are now treated as dimensionless (raised exception previously) Fixed a bug with derived units and dimensions in check_dimensions. Fix bug in convert_to returning wrong units in some cases where the linear equation system between canonical units is unsolvable. physics.vector Fix documentation for v1pt_theory Introduced new methods on ReferenceFrame: .orient_axis(), .orient_explicit(), .orient_body_fixed(), .orient_space_fixed(), and .orient_quaternion(). .orient() calls out to each new method and it is recommended to use the new methods. Added .xreplace() to Vector Class. Added .xreplace() to Dyadic Class. Added .evalf() to Vector class Added .evalf() to Dyadic class plotting Added handling for OverflowError (when plotting functions like exp(1/x)). polys Added internal representation as both dense and sparse matrix Added docstrings for Domain Matrix class Add zeros method to DomainMatrix A new sparse implementation of DomainMatrix is added. make is_disjoint strict so that inequalities evaluated with solve() return consistent results The DomainMatrix class has moved from sympy.polys.domainmatrix to sympy.polys.matrices and should now be imported as from sympy.polys.matrices import DomainMatrix. A new polys FiniteExtension domain is added. numberfields: implemented new algorithm for primitive_element in case ex=True. added boilerplate index method for FracField Solved bug in Poly.replace Solve a bug in polytools.degree. Use assumption system instead of structural equality check in __bool__ method of Expression domain element (fixing cases where Poly(...).is_zero would incorrectly return False) printing The pretty printer was made faster when printing large sequences (e.g. tuples, sets etc). Fixed a bug which led to latex printing error in singularity function expressions. Replaced the Theano printer with an Aesara printer Symbols with Unicode character names and no underscores, like ω0 now properly pretty print subscripts. Fix the printing of the vertical bar in ImageSet, ConditionSet, and ComplexRegion so that it is the full height in the pretty and LaTeX printers. Fix the tag for the degree of a root with a rational base in MathML output. irrational powers are no longer printed with square root sign, they are printed as fractional powers Allow spreading assignments across multiple symbols when printing multi-member objects. Support various array constructor types when printing arrays to GLSL. Fixes a bug when printing negative expressions to GLSL with operators printed as functions. Support a custom 0 substitution for printing expressions representing various GLSL types. make cxxcode correctly print the first argument of Min/Max functions sets Added basic denesting functionaility for sets of the form ConditionSet(x, Contains(x, ...)). ConditionSet.contains(x) now returns False if x is not in the base set (even if its substitution into the condition will cause an error). FiniteSet.evalf with a subs argument now does the substitution. Previously, the argument was ignored. Add .simplify to FiniteSet. Make 'is_subset' work for ProductSet changed behavior of Rationals.contains(float) to indeterminate tests modified to include new behavior .evalf() precisions with x and FiniteSet(x) is same now. simplify Fix simplify calls sympify without rational parameter TRmorrie now takes powers of cos terms into account solvers Fixed a bug in solve that expanded hyperbolic function constants to equivalent exp form. Handle x**r=0 case in invert_complex Fixed a bug in solveset, which led to infinite recursion for solving some expressions involving radicals. The new sparse DomainMatrix implementation is used in linsolve to make it much faster when solving large sparse systems of linear equations. Modified symbols sorting in solvers._solve_system to ensure solve and linsolve solve the same way Added solver for 2nd order nonlinear autonomous ODE. speed improvement in a substep of rsolve_hyper (when computing constant solutions to constant coefficient recurrences). Fixed incorrect solutions from rsolve for higher order recurrences stats Refactory and simplification of sampling backends for random variables. Expectation can now be calculated across multiple Uniform RVs evaluating to zero Implemented Matrix Student's t-distribution Fixed simplification bug in Stochastic Processes by introducing abstract Distribution class API changed for StochasticProcess.distribution which now expects a timestamp argument instead of RandomIndexedSymbol object. Implemented FlorySchulz Distribution implemented LogCauchy Distribution Implemented Logit-Normal probability distribution Fixes cdf computation of Discrete random variables by using integer limits Added 2 new distributions in frv_types. added support for fundamental matrix for regular markov chains Added support for multiple RandomIndexedSymbols in DiscreteMarkovChain tensor Introduced objects ArraySymbol and ArrayElement for array expressions equivalent to MatrixSymbol and MatrixElement in the matrix expression module. shape() function is introduced in array module. Add class ZeroArray for array expressions of zero-valued elements. Make Array differentiation(derive_by_array) work with non sympy expressions. Added tensordiagonal( ) function to perform diagonalization of array expressions. Adding an array with any other type now consistently gives NotImplemented. utilities Added official support for using CuPy to GPU accelerate lambdify functions. Added Replacer class to simplify the creation of replacement expressions with MatchPy. Added tests for optional parameter in MatchPy patterns. Added string printers for MatchPy-compatible wildcards in sympy.utilities.matchpy_connector Added WildDot, WildPlus and WildStar classes to MatchPy connector. These classes correspond to the dot, dot-plut and dot-star expressions in regular expression, but operate on SymPy expression trees and are aware of associative and commutative properties, features supported through the MatchPy library. minlex no longer accepts is_set or small arguments minlex and least_rotation now accept key= arguments similar to sorted. vector Fixed a bug with integral over ImplicitRegion objects other Expanding documentation to include all class members with docstrings
py-sympy: Update to 1.7 Changelog: SymPy 1.7 was released on 29th November 2020. This version of SymPy has been tested on Python 3.6, 3.7, 3.8, 3.9 and PyPy. See our Python version support policy for more information on when we plan to drop support for older Python versions. Note in particular that SymPy 1.5.1 was the last release to support Python 2.7. SymPy 1.7 will not work on Python 2.7. Python 2.7 users should install SymPy 1.5.1 and will not be able to install any further SymPy updates without updating to Python 3. Install SymPy with pip install -U sympy or if you use Anaconda conda install sympy Highlights There are many changes in 1.7 (see below). Backwards compatibility breaks and deprecations * core + Modules and names that were accidentally importable from sympy are no longer importable. In sympy 1.6 importing and using these names would give a deprecation warning. In sympy 1.7 these names are removed. As an example from sympy import add would need to be from sympy.core import add or import sympy.core.add as add. (#19554 by @oscarbenjamin) + DEPRECATION: Using non-Expr args in Add, Mul or Pow is now deprecated ( #19445 by @oscarbenjamin) * diffgeom + Manifold.patches attribute is deprecated. (#19368 by @JSS95 and @mcpl-sympy) + Patch.coord_systems attribute is deprecated. (#19368 by @JSS95 and @mcpl-sympy) + Class signature names of CoordSystem is deprecated. CoordinateSymbol class and CoordSystem.symbols attribute are introduced instead. (#19368 by @JSS95 and @mcpl-sympy) + CoordSystem.transforms, CoordSystem.connect_to, and CoordSystem.coord_tuple_transform_to are deprecated. Class signature relations, CoordSystem.transformation and CoordSystem.transform are introduced instead. (#19368 by @JSS95 and @mcpl-sympy) * printing + sympy.printing.pretty.pretty_symbology.xstr has been deprecated (#20081 by @eric-wieser) + The unicode argument to sympy.printing.stringpict.prettyForm has been deprecated (#20081 by @eric-wieser) + The deprecation of calling preview with viewer="StringIO" is now expired instead of forgotten (a regression in 1.6.0) (#19905 by @eric-wieser) + The modules sympy.printing.ccode, sympy.printing.fcode, and sympy.printing.cxxcode have been renamed to sympy.printing.c, sympy.printing.fortran, and sympy.printing.cxx, respectively. This was done to avoid conflicts that occur when a module name is the same as a function name. The modules are still importable under their old names but doing so is deprecated and a warning will be given (#19908 by @asmeurer) + from sympy.printing.codeprinter import Assignment no longer works. You should use from sympy.codegen import Assignment, which is where Assignment has lived since SymPy 1.1. (#19908 by @asmeurer) + Calling preview with viewer="file" no longer looks for a file executable (a regression in 1.6.0) (#19905 by @eric-wieser) * solvers + solve_linear_system is now a thin wrapper for linsolve. It is recommended to use linsolve in new code. solve_linear_system maybe deprecated or removed in future. (#18814 by @oscarbenjamin) * utilities + find_executable is deprecated in favor of the builtin shutil.which. (# 19634 by @eric-wieser) Changes * algebras + Added DocString for integrate function of quaternion class. (#19410 by @mohitshah3111999) * codegen + Added support for generating calls to scipy.special.cosm1. (#20011 by @bjodah) + sympy.codegen and sympy.combinatorics are no longer imported as part of from sympy import *. The codegen and combinatorics modules do not have any names that are included in the top-level namespace, so their being imported with the top-level SymPy was a mistake. This improves the import time of from sympy import *. (#19908 by @asmeurer) + Added support for generating calls to numpy.logaddexp & numpy.logaddexp2. (#19880 by @bjodah) + Fix bugs to the parser of matrix expressions in order to build CodegenArray objects correctly. (#19197 by @Upabjojr) * combinatorics + Fixed a bug in PermutationGroup.minimal_blocks caused by modifying a list while iterating over its indices. (#19954 by @ilya-pchelintsev) * concrete + Implemented Raabe's Test (#18656 by @sachin-4099) * core + Fixed a few broken cases of expr.is_integer (#20450 by @coproc and @tbennun) + Modules and names that were accidentally importable from sympy are no longer importable. In sympy 1.6 importing and using these names would give a deprecation warning. In sympy 1.7 these names are removed. As an example from sympy import add would need to be from sympy.core import add or import sympy.core.add as add. (#19554 by @oscarbenjamin) + Zero raised to power Negative Infinity gives ComplexInfinity(zoo) instead of zero (#20212 by @sidhu1012) + Extensible add, mul and power functions are introduced to allow sympy objects to define what classes should be used for them in place of Add, Mul and Pow (e.g. matrices use MatAdd). This is an experimental approach aimed at enabling the behaviour of core routines (expand, collect, etc) to be customised by user-defined types (e.g. MatAdd rather than Add). This mechanism is still experimental, is not fully implemented across the core and might be changed or removed in a future release of sympy. (#19463 by @JSS95 and @mcpl-sympy) + divmod on sympy.Float with 0 numerator now results in (0, 0). (#20109 by @eriknw) + Dict operations no longer automatically converts strings into SymPy types. (#19911 by @asmeurer) + Dict operations no longer raise SympifyError. (#19911 by @asmeurer) + Fixes _eval_nseries() function of power.py (#19508 by @sachin-4099) + Remove optional dependency on fastcache (#19492 by @pbrady) + DEPRECATION: Using non-Expr args in Add, Mul or Pow is now deprecated ( #19445 by @oscarbenjamin) + When creating an Add or Mul with evaluate=False identities (0 or 1) are no longer removed. (#19450 by @oscarbenjamin) + Fixes _eval_nseries() function of mul.py (#19369 by @sachin-4099) + Sum is now included in count_ops results (#19261 by @smichr) + match has been optimized to improve term-matching in Add (#19261 by @smichr) + match will automatically ignore bound symbols when matching (#19261 by @smichr) + match results will no longer contain extraneous symbols (only those requested) (#19261 by @smichr) + as_dummy should give a canonical result for expressions having bound symbols (#19261 by @smichr) + Lambdas written in terms of different symbols will no longer compare equal; this was an abuse of the Python == operator (#19261 by @smichr) + expr: A new method is_meromorphic is added. (#19306 by @jksuom) * diffgeom + Manifold.patches attribute is deprecated. (#19368 by @JSS95 and @mcpl-sympy) + Patch.coord_systems attribute is deprecated. (#19368 by @JSS95 and @mcpl-sympy) + Class signature names of CoordSystem is deprecated. CoordinateSymbol class and CoordSystem.symbols attribute are introduced instead. (#19368 by @JSS95 and @mcpl-sympy) + CoordSystem.transforms, CoordSystem.connect_to, and CoordSystem.coord_tuple_transform_to are deprecated. Class signature relations, CoordSystem.transformation and CoordSystem.transform are introduced instead. (#19368 by @JSS95 and @mcpl-sympy) + CoordSystem.jacobian_determinant method is introduced. (#19368 by @JSS95 and @mcpl-sympy) * functions + lambdify added a warning when args is a set. (#19792 by @foice, @RobertoFranceschini, and @sylee957) + Fixes _eval_nseries method of log (#20002 by @sachin-4099) + Adds _eval_is_meromorphic method and _eval_aseries to class lowergamma (#19990 by @sachin-4099) + Adds _eval_is_meromorphic method and _eval_rewrite_as_tractable method to class uppergamma (#19990 by @sachin-4099) + Rectifies eval method of class besselk (#19990 by @sachin-4099) + Adds _eval_is_meromorphic to bessel function. (#19963 by @sachin-4099) + Adds _eval_nseries function to sin and cos. (#19916 by @sachin-4099) + reduced symbolic multiples of pi in trigonometric functions (#19741 by @sachin-4099) + fixed errors in assumptions when rewriting RisingFactorial / FallingFactorial as gamma or factorial (#18696 by @sachin-4099) + Adds _singularities to LambertW function (#19716 by @sachin-4099) + Rectifies _eval_rewrite_as_tractable method of class erf (#19697 by @sachin-4099) + Improved condition checking in piecewise_simplify() (#19596 by @dhruvmendiratta6 and @smichr) + Implemented _eval_rewrite_as_Abs() for sign (#19487 by @dhruvmendiratta6) + Adds cdir parameter to handle series expansions on branch cuts (#19555 by @sachin-4099) + Adds _eval_rewrite_as_factorial() and _eval_rewrite_as_gamma() functionalities for subfactorial (#19515 by @sachin-4099) + Fixed cot.as_real_imag (sign error in imaginary part) (#19468 by @DaveWitteMorris and @gschintgen) + Corrects the _eval_as_leading_term() method of tan and sec functions (# 19461 by @sachin-4099) + bsplines are more robust in terms of handling symbolic knots (#19272 by @smichr) * geometry + Ellipses with eccentricity >=1 and for eccentricity < 0 will be handled as trivial cases (#20045 by @agrawalshubham01) * integrals + upgrades to manualintegrate to support inverse trig functions! (#19993 by @iammosespaulr) * interactive + The _repr_latex_, _repr_svg_, and _repr_png_ methods of subclasses of sympy objects are no longer discarded when init_printing() is called. ( #19944 by @eric-wieser) * logic + Binary boolean operators on Boolean objects no longer coerce strings (# 20093 by @eric-wieser) * matrices + Adding an array and a matrix now consistently gives TypeError. (#20159 by @sidhu1012) + changed subs function to check if input is zip (#19159 by @czgdp1807 and @gfolbe318) + added tests in test_commonmatrix.py (#19159 by @czgdp1807 and @gfolbe318) + The ordering of parameters in a parametrised solution from gauss_jordan_solve was fixed. Previously incorrect results were returned for some underdetermined systems. (#19885 by @1124816) + Prevents infinite recursion with rmul (#19860 by @mloubout) + Added class MatrixSet to represent the set of matrices (#19826 by @Smit-create) + Disabled default matrix intermediate product simplification and changed it to enable via context manager. (#19588 by @oscarbenjamin and @Pristine-Cat) + Use more efficient Cholesky factorization method to check if matrices are positive semidefinite. (#19573 by @galbwe) + row_del and col_del will raise IndexError rather than ValueError when the index is out of bounds. (#19571 by @sylee957) + Fixed a bug in the implementation of Sylvester's criterion for determining if a matrix is positive semidefinite. (#19556 by @galbwe) + Explicit non-matrix are treated as scalar (#19533 by @mloubout) + QRdecomposition will return matrices with zero rows and columns for zero rank matrices. e.g. Matrix([[0, 0, 0], [0, 0, 0], [0, 0, 0]]) will be decomposed with Matrix(3, 0, []) and Matrix(0, 3, []) (#19319 by @sylee957) + Added Matrix.companion for creating dense companion matrix. (#19339 by @sylee957) + Added CompanionMatrix for creating a symbolic companion matrix. (#19339 by @sylee957) + Matrix([]).eigenvals(multiple=True) will give an empty list instead of an empty dict. (#19355 by @sylee957) + Determinant is now considered commutative. (#19354 by @eric-wieser) * ntheory + Integrated Lenstra's Elliptic Curve factorization into factorint (# 19937 by @abh2k) + Added quadratic sieve (#19657 by @abh2k) + Implemented Lenstra's Elliptic curve factorization and Elliptic curve primality test (#19436 by @abhinav28071999) * parsing + Added support for while loop in C Parser (#20188 by @smitgajjar) + Upgraded Relational Operator support (#19982 by @iammosespaulr) + Bra-Ket Notation support (#19982 by @iammosespaulr) + Improved Grammar (#19982 by @iammosespaulr) + added Latex support for "not equal" and expanded support for less than, greater than symbols (#19970 by @bhpayne) + parse_latex supports \left and \right parenthesis notation. (#19466 by @sylee957) + parse_latex can parse expressions with amsmath spacing (#19475 by @sylee957) + Added parsing of \exp in parse_latex. (#19395 by @sylee957) + Add more parsing rules and test examples. (#19177 by @wuyudi) + Added support for more data types in C parser: signed char, unsigned char, short, short int, signed short, signed short int, unsigned short, unsigned short int, unsigned int, long, long int, signed long, signed long int, unsigned long, unsigned long int, double, long double. Also, modified the data type for int and float to intc and float32 respectively, replacing integer and real (#19230 by @smitgajjar) + Added support for shorthand operators in C parser: +=, -=, *=, /= and % = (#19230 by @smitgajjar) + Removed the assumption of value of a variable, if it is not initialized while variable declaration(e.g.; in case of int a;, the value of a was assumed to be Integer(0), in case of float b;, the value of b was assumed to be Float(0.0) and in case of bool c;, the value of c was assumed to be S.false). Also, removed the assumption of default value of formal parameters while parameter declaration in function definition or function prototype (e.g.; in case of function definition void func (int a, float b) { //some code }, default value of formal parametersa and b were assumed to be Integer(0) and Float(0.0) respectively) (# 19230 by @smitgajjar) * physics.control + Added dc_gain, poles, zeros, and is_stable in TransferFunction class. ( #19896 by @namannimmo10) + Adding a new control systems toolbox as physics.control. (#18436 by @benepla and @namannimmo10) + Add TransferFunction, Series, Parallel, and Feedback class for physics.control submodule (#19390 by @benepla and @namannimmo10) * physics.quantum + Simplification of Dagger() * IdentityOperator() (#19783 by @dhruvmendiratta6) + When printing, Commutator, Anticommutator, InnerProduct, TensorProduct, and OuterProduct now respect keyword-arguments to sstr. (#19424 by @eric-wieser) * physics.units + Fixed some dimensional analysis bugs with the addition and multiplication operators. (#19705 by @mgreminger) * physics.vector + Added user warnings for all possible paths are found in particle.py. (# 20131 by @sidhu1012) + Added user warning for cyclic paths in particle.py. (#20131 by @sidhu1012) + Point.vel() now attempts to calculate the velocity using the relative position from other points if it has not been already set by the user. This behavior mimics the existing behavior in ReferenceFrame.ang_vel_in (). (#20049 by @moorepants and @sidhu1012) + VectorLatexPrinter now respects the symbol_names setting when printing dynamicsymbols (#19684 by @eric-wieser) + VectorLatexPrinter now know about the same trig functions as the regular printer (#19684 by @eric-wieser) + When printing, Vector and Dyadic now respect keyword-arguments to sstr and latex. As a result, these no longer use vector printing customizations unless init_vprinting has been called. (#19640 by @eric-wieser) * plotting + capability to subclass Basebackend and specify it to the plotting functions, thus creating plots with other plotting libraries (#20463 by @oscarbenjamin) + Fixed plot3d_parametric_line plotting curves out of the box. (#19252 by @sylee957) * polys + Polys with complex floating point coefficients will now use the CC domain rather than EX. (#20194 by @oscarbenjamin) + Fixed a bug in minimal_polynomial when using Groebner bases (compose= False) (#19799 by @coproc) + Fixed GeneratorsError for creating some elements of FractionField when its ground domain is FractionField or PolynomialRing. (#19713 by @sylee957) + Fixed Poly initialized with PolyElement mutating the generator of the coefficient in the form of polynomial. (e.g. Poly(ZZ[x](x+1), y, domain =ZZ[x]) becomes Poly(y+1, y, domain=ZZ[x])) (#19659 by @sylee957) + Fixed Poly initialized with FracElement raising SympifyError. (e.g. dom = ZZ.frac_field(x); Poly(dom(x+2), y, domain=dom)) (#19659 by @sylee957 ) + Add division to finite extensions. (#19593 by @gschintgen and @jksuom) + Fixed GCD to always return a non-negative constant. (#19569 by @KaustubhDamania) + added new domains for Gaussian integers and rationals (#15396 by @jksuom and @smichr) + Add the Gaussian domains ZZ_I and QQ_I to Poly. Make Poly use the Gaussian domains automatically when I is present in the input. Add factorisation over the Gaussian integers (ZZ_I). The polys keyword argument gaussian=True now results in the domain QQ_I rather than the extension field QQ<I>. (#15396 by @oscarbenjamin) + improvement of dup_zz_mignotte_bound(f, K) by Knuth-Cohen bound (#19254 by @lagamura) * printing + Support frac with pycode printers (for lambdify) (#20115 by @ehren) + Round-trip printing of floats (double-precision) to content MathML. (# 19958 by @lcontento) + latex now once again requires settings to be passed as keyword and not positional arguments, and respects printer settings changed with set_global_settings; restoring the behavior from sympy 1.2 and earlier. (#20067 by @eric-wieser) + sympy.printing.pretty.pretty_symbology.xstr has been deprecated (#20081 by @eric-wieser) + The unicode argument to sympy.printing.stringpict.prettyForm has been deprecated (#20081 by @eric-wieser) + The unicode attribute of sympy.printing.stringpict.prettyForm has been deprecated (#20081 by @eric-wieser) + The mpmath code printer now correctly prints the loggamma function. (# 19913 by @abhaydhiman) + Use literal suffix for 1.0 in C89CodePrinter's printing of pow when the exponent is -1 (#19956 by @bjodah and @mmohrhard) + The modules sympy.printing.ccode, sympy.printing.fcode, and sympy.printing.cxxcode have been renamed to sympy.printing.c, sympy.printing.fortran, and sympy.printing.cxx, respectively. This was done to avoid conflicts that occur when a module name is the same as a function name. The modules are still importable under their old names but doing so is deprecated and a warning will be given (#19908 by @asmeurer) + from sympy.printing.codeprinter import Assignment no longer works. You should use from sympy.codegen import Assignment, which is where Assignment has lived since SymPy 1.1. (#19908 by @asmeurer) + Calling preview with viewer="file" no longer looks for a file executable (a regression in 1.6.0) (#19905 by @eric-wieser) + The deprecation of calling preview with viewer="StringIO" is now expired instead of forgotten (a regression in 1.6.0) (#19905 by @eric-wieser) + When printing, NDimArray now respects keyword-arguments to sstr (#19903 by @eric-wieser) + preview no longer fails with ValueError if the preamble contains a % character. (#19858 by @eric-wieser) + Types which are not recognized by the LaTeX printer no longer have their __str__ interpreted as LaTeX, and have their str(...) printed as pre-formatted text as if they were printed normally. This includes the builtin str type: latex("hello") now results in the latex \mathtt{\text {hello}}. If a custom type intends to be interpreted as latex, it should define the _latex hook as described in the docs: def _latex(self, printer): return str(self) # indicate that the result of __str__ is LaTeX-compatible To print a string containing LaTeX math using MathJax, use import IPython IPython.display.Math(string) (#19611 by @eric-wieser) + The latex printer now shows builtin floats using ...x10^... notation instead of ...e... notation. (#19611 by @eric-wieser) + preview now throws OSError instead of SystemError if viewers cannot be found. (#19818 by @eric-wieser) + Fixed the SciPy printer for sparse matrices (#19633 by @benjaminwolba and @sylee957) + preview(..., output='pdf') now uses dvipdfmx instead of dvipdf if available. As a result, it now works with a MiKTeX installation on windows. (#19635 by @eric-wieser) + LatexPrinter._print is no longer called on strings which have already been converted to Latex. (#19614 by @eric-wieser) + A new sympy.printing.defaults.Printable base class was added, which is a mixin providing _repr_latex_ in terms of LatexPrinter().doprint(). Any user type which subclasses this will opt into init_printing. (# 19425 by @eric-wieser) + Printing unevaluated Muls with multiple Number factors will show all factors strictly in order. Identities will also be shown explicitly. (# 19450 by @oscarbenjamin) + user types that implement _latex are now printed as LaTeX when embedded within builtin collections like list or dict. (#19389 by @eric-wieser) + fixed a bug where srepr function would not print dictionary and set properly (#19346 by @rational-kunal) + tuples of one element now include the usual trailing comma (#19348 by @eric-wieser) + mat_symbol_style='bold' no longer applies to subscripts of matrix symbols (#19301 by @eric-wieser) * series + Adds e.is_Pow heuristic to limits.py to improve the limit evaluations of Pow objects (#19680 by @sachin-4099) + Changes in mrv() function of gruntz.py and cancel() function of polytools.py resolves RecursionError and Timeout in limit evaluations ( #19646 by @sachin-4099) + modified order.py to better work with Add objects. (#19546 by @maurogaravello) + Adds a functionality to the doit() method of limits.py which uses is_meromorphic() for limit evaluations (#19432 by @sachin-4099) + Fixed wrong computations of fourier_series for even or odd functions with limits that are specified non-central. (#19382 by @sylee957) + Replaces xreplace() with subs() in rewrite() function of gruntz.py resolving incorrect limit evaluations (#19297 by @sachin-4099) + Adds a condition to limitinf() function of gruntz.py resolving incorrect limit evaluations (#19292 by @sachin-4099) * sets + Earlier expr and sets were treated equal which gave incorrect output for some set functions(mainly : - in, is_subset), made sets and expr not to be equal (#20208 by @sidhu1012) + nested multi-symbol first arg for ConditionSet now handled with subs/ as_dummy (#19512 by @smichr) + the bound symbols cannot be replaced with subs (#19512 by @smichr) + the error checking for mismatched signatures for sym and the base set has been improved (#19512 by @smichr) + ConditionSet still tries to unify symbols and denest a base set that is given as a ConditionSet but will no longer introduce new symbols (and will leave the base set a a ConditionSet) when this cannot be done (# 19512 by @smichr) + Fixed ConditionSet.dummy_eq() and ConditionSet.as_dummy(). (#19502 by @gschintgen) + Fixed ConditionSet.subs() in the case where the substitution targets a free symbol. (#19495 by @gschintgen) + Fixed _infimum_key sorting key. (#19437 by @gschintgen) + ImageSets with Lambdas having different symbols will no longer compare equal and should be compared like a.dummy_eq(b) (#19261 by @smichr) * simplify + Fixed sqrtdenest giving wrong results for some forms of sqrt(a + b*sqrt (r)) (#19932 by @sylee957) + Fixes a bug in collect when collection keys are not independent. (# 19720 by @mloubout) + Improved simplification for sign() (#19596 by @dhruvmendiratta6 and @smichr) + Improved trigsimp for hyperbolic functions nested in non-trig functions. (#19548 by @gschintgen) + Fixes a bug in collect when collected symbols appear in the facorized expression. (#19431 by @mloubout) * solvers + Added simplification strategies for simplifying the solutions of systems of ODEs (#19998 by @mijo2 and @oscarbenjamin) + Fix bug in nonlinsolve leading to key-error (#19189 by @nsfinkelstein and @oscarbenjamin) + improved functionality for solveset in case of inequalities (#19978 by @maurogaravello) + Handling of inequalities involving Piecewise is improved in solveset. ( #19986 by @maurogaravello) + Solving higher-order system of ODEs by reducing/transforming it into the first-order system of ODEs by numerous methods. (#19838 by @mijo2) + Added component division technique to divide the system of ODEs into logical sub-systems and solving each of these separately. (#19762 by @mijo2) + Extending checkodesol and constants_renumber to handle system of ODEs ( #19733 by @mijo2) + Added dsolve_system that can solve a system of ODEs (#19695 by @mijo2) + API for the _linear_neq_order1_type1-4 was changed to make it easier for anyone to access the solver (#19653 by @mijo2) + Solving linear systems particularly involving polynomial coefficients is much faster (#18844 by @oscarbenjamin) + Added the new n equations linear first-order non-constant coefficient non-homogeneous solver where the coefficient matrix of the system of ODEs is commutative with its antiderivative. (#19594 by @mijo2) + solveset will always use a symbol that has only either the real or complex attribute and no other attribute; when a ConditionSet is returned, the original symbol for which the solution is being sought will be used if it does not cause evaluation of the result. (#19512 by @smichr) + In dsolve there is no a general solver that can solve systems of constant coefficient non-homogeneous first order ODEs of any size in terms of integrals. (#19341 by @mijo2) + Fixed exception handling in solveset's secondary trigonometric solver. (#19566 by @gschintgen) + equations with an additive generator are now solved more quickly (# 19524 by @smichr) + Improved solveset capabilities for solving trigonometric equations, notably rational and symbolic coefficients are now supported. (#19507 by @gschintgen) + solve_linear_system is now a thin wrapper for linsolve. It is recommended to use linsolve in new code. solve_linear_system maybe deprecated or removed in future. (#18814 by @oscarbenjamin) + Addition of a solver that handles a subclass of linear first order non-constant coefficient homogeneous systems of ODEs with any number of equations. (#19185 by @mijo2) * stats + The state space of ContinuousMarkovChain is now by default a Range object instead of S.Reals. (#20150 by @czgdp1807 and @naveensaigit) + The generator matrix of ContinuousMarkovChain is now by default a MatrixSymbol object instead of None. (#20150 by @czgdp1807 and @naveensaigit) + RandomMatrixSymbol.doit will be invariant upon call. (#20136 by @sylee957) + The state space of DiscreteMarkovChain is now by default a Range object instead of S.Reals. (#20042 by @Maelstrom6) + The transition probability matrix of DiscreteMarkovChain is now by default a MatrixSymbol object instead of None. (#20042 by @Maelstrom6) + Fixed xreplace infinitely expanding random matrix ensemble classes. (# 20018 by @sylee957) + All the ensemble classes (RandomMatrixEnsemble, GaussianEnsemble, GaussianOrthogonalEnsemble, ...) now becomes stub function constructors. If you want to use them as classes, you should import them as RandomMatrixEnsembleModel, GaussianEnsembleModel, ... (#20018 by @sylee957) + Added sampling of Joint RVs from external libraries (#19848 by @Smit-create) + Added sampling for Matrix Distributions (#19857 by @Smit-create) + Allowing CompoundDistribution to handle more than one random variables (#19808 by @Smit-create) + Added Wishart and MatrixNormal Distributions (#19795 by @Smit-create) + Change in return type of P and E with evaluate=False. With evaluate= False, P and E are made to return Probability and Expectation object respectively. (#19819 by @Smit-create) + Added MatrixGamma Distribution (#19734 by @Smit-create) + Added symbolic classes of Moment and CentralMoment (#19724 by @Smit-create) + Added support for Compound Distributions (#19648 by @Smit-create) + Added doit in class Probability (#19696 by @Smit-create) + Added MutlivariateNormal and MutlivariateLaplace function (#19631 by @Smit-create) + Added Poisson, Wiener and Gamma Processes (#19387 by @Smit-create) + Added Expectation Matrix, Variance Matrix and CrossCovariance Matrix (# 19529 by @Smit-create) + Added sample_stochastic for sampling from stochastic processes. (#19500 by @Smit-create) + FIxes free_symbols method of RandomIndexedSymbol (#19459 by @Smit-create) + Added Sampling from external libraries for all the random variables of sympy (#19342 by @Smit-create) + Added doit method in Expectation and made E to call Expectation (#19290 by @Smit-create) + Added is_random in sympy.stats.rv to check if expression contains random variables (#19304 by @Smit-create) + expand added in sympy.stats.symbolic_rv API. (#19295 by @Smit-create) + Added Lomax and Bounded pareto distribution (#19273 by @Smit-create) + Added sampling methods for continuous variables (#18754 by @Smit-create ) + Added library option in sample (#18754 by @Smit-create) + sample returns an iterator object since version 1.7 (#18754 by @Smit-create) * tensor + Adding ArrayDerivative class as subclass of Derivative. This new handles derivatives involving non-scalar expressions. (#20072 by @Upabjojr) * utilities + sympy.utilities.iterables.partitions() no longer reuses the same dictionary for each yielded output. (#20154 by @asmeurer) + Add support for Integral with lambdify (using scipy or mpmath) (#20134 by @ehren) + Lambdifying an expression with loggamma using mpmath no longer raises ImportError. (#19913 by @abhaydhiman) + find_executable is deprecated in favor of the builtin shutil.which. (# 19634 by @eric-wieser) * vector + integral of parametric region depends on the order of limits at the time of initialization. (#20044 by @friyaz) + vector_integrate can integrate over ImplicitRegion objects. (#19883 by @friyaz) + Added a function to find a rational point on conic (#19807 by @friyaz and @Upabjojr) + Added support to create implictly defined regions. (#19681 by @friyaz) + Added support to integrate scalar/vector fields over objects of geometry module. (#19650 by @friyaz) + added class to represent integral of scalar/vector field over a parametric surface. (#19539 by @friyaz) + Modified API of ParametricIntegral class (#19580 by @friyaz) + Added class to represent a parametric region in space. (#19472 by @friyaz) * other + The LaTeX docs now need to built with xelatex rather than pdflatex. (# 20309 by @oscarbenjamin) + Support for Python 3.5 has been dropped. SymPy now requires Python 3.6 or newer. (#20145 by @oscarbenjamin) + more function raise TypeError when passed invalid keyword-arguments, rather than ignoring them silently (#20086 by @eric-wieser) + assert sympy.testing.pytest.raises(Exception, func) no longer always asserts when pytest is not present (#20012 by @eric-wieser) + Make SymPy do less at import time so that import sympy is faster. (# 19910 by @asmeurer) + Improve code quality by cleaning the doctests up (#19406 by @InCogNiTo124 and @oscarbenjamin) + intersphinx links to :mod:`sympy` no longer point to the documentation for Immutable Matrices (#19430 by @eric-wieser)
py-sympy: mark incompatible with Python 2.7
py-sympy: Update to 1.6.2 Changelog: 1.6.2 Changes matrices Fixed a bug that made matrix operations fail in a multithreaded application. (#19812 by @pd0wm) polys Using factor with the extension argument no longer hangs in some cases. (#19847 by @jksuom and @rainwoodman) printing Calling preview with viewer="file" no longer looks for a file executable (a regression in 1.6.0) (#19904 by @eric-wieser) The deprecation of calling preview with viewer="StringIO" is now expired instead of forgotten (a regression in 1.6.0) (#19904 by @eric-wieser) other intersphinx links to :mod:`sympy` no longer point to the documentation for Immutable Matrices (#19881 by @eric-wieser and @oscarbenjamin) 1.6.1 Changes functions Fixes AttributeError in limit evaluation (#19604 by @sachin-4099) matrices Disabled default matrix intermediate product simplification and changed it to enable via context manager. (#19612 by @oscarbenjamin and @Pristine-Cat) simplify Fixes a bug in collect when collected symbols appear in the factorized expression. (#19601 by @mloubout and @oscarbenjamin) solvers Fixed exception handling in solveset's secondary trigonometric solver. (#19602 by @gschintgen and @oscarbenjamin) other SymPy is importable again in Python 3.5.1 (imports of typing.Type are removed) (#19620 by @oscarbenjamin) Fix the sphinx docs build for sphinx 3.1.1 (#19598 by @oscarbenjamin) 1.6 Backwards compatibility breaks and deprecations Please manually add any backwards compatibility breaks or deprecations here, in addition to the automatic listing below. assumptions Removed deprecated Q.bounded (use Q.finite instead). Deprecated since version 1.0 (issue: #9425) (#18390 by @Smit-create) Removed deprecated Q.infinitesimal (use Q.zero instead). Deprecated since version 1.0 (issue: #9675) (#18390 by @Smit-create) Removed deprecated Q.infinity (use Q.infinte instead). Deprecated since version 1.0 (issue: #9426) (#18390 by @Smit-create) calculus Deprecated evaluate argument in differentiate_finite for making non-conservative finite differences. (#17881 by @vezeli) combinatorics Using Permutation.print_cyclic will raise deprecation warnings (#18033 by @oscarbenjamin, @souravgl0, and @sylee957) core Deprecated sympify automatically converting custom objects with __str__ or __repr__ implemented. (#19006 by @sylee957) BREAKING CHANGE: Basic.has no longer accepts strings as input. For example in SymPy 1.5 you could do Symbol('x').has('x') and the string 'x' passed to has would be sympified to a symbol so that the result would be True. In SymPy 1.6 this will raise an error because the string 'x' can not be sympified using strict sympification. (#19251 by @oscarbenjamin) Remove deprecated bounded, unbounded and infinitesimal. Deprecated since version 0.7.6 (issue #8071) (#18503 by @Smit-create) Relational is no longer a subclass of Expr and does not produce nonsensical results in arithmetic operations. This affects all Relational subclasses (Eq, Ne, Gt, Ge, Lt, Le). It is no longer possible to call meaningless Expr methods like as_coeff_Mul on Relational instances. (#18053 by @oscarbenjamin) Expr now uses cooperative dispatch for binary operations so it is possible for non-Expr Basic subclasses to override the behaviour of e.g. a + b where one of a or b is an instance of Expr. This also means that any non-Expr Basic subclasses can not depend on Expr.__add__ to create Add(a, b): if a class is not a subclass of Expr and wants to define binary operations with Expr it must do so explicitly in its own __add__ method. For classes depending on this this is not a backward compatible change. (#18116 by @oscarbenjamin) matrices The Matrix.is_zero property has been renamed to Matrix.is_zero_matrix. Matrix.is_zero is now always False. This is because in general is_zero means the number zero so a matrix can never be zero. To get the old behavior of M.is_zero in both old and new versions of sympy use from sympy.core.logic import fuzzy_and; fuzzy_and(m.is_zero for m in M). (#18464 by @sylee957) polys BREAKING CHANGE: Poly and PurePoly now subclass Basic rather than Expr. This means that they no longer have various Expr methods such as expand that do not make sense for Poly. Use as_expr to convert the Poly to an Expr before using Expr methods. (#18613 by @oscarbenjamin) BREAKING CHANGE: Poly instances with different domains now always compare unequal with p1 == p2 and p1.eq(p2). Previously Poly instances that had the same expression and generators would compare equal even if the domains were different. In some cases it might be necessary to specify the domain when comparing e.g. if p == Poly(x, x, domain='QQ'). (#18613 by @oscarbenjamin) DEPRECATION: Mixing Poly with non-polynomial Expr in binary operations is now deprecated. For example Poly(x, x) * exp(x) will give a deprecation warning but still return the Expr x*exp(x) as before. If the Expr can be converted to Poly (e.g. Poly(x, x) * x) then a Poly will be returned. To get an Expr always use the as_expr method first to convert the Poly to an Expr. To get a Poly always use as_poly to convert the Expr to a Poly. (#18613 by @oscarbenjamin) DEPRECATION: Passing Poly as the integrand to the integrate function or Integral class is now deprecated. Use the integrate method instead e.g. Poly(x, x).integrate(x) (#18613 by @oscarbenjamin) printing Removed deprecated Ccodeprinter (Use C89Printer or C99Printer instead). Deprecated since version 1.1 (Issue : #12220). (#18392 by @risubaba) Removed deprecated file viewer option in preview. Deprecated since version 0.7.3(Issue: #7018) (#18392 by @risubaba) Removed deprecated StringIO viewer option in preview. Deprecated since version 0.7.2(Issue: #7083) (#18392 by @risubaba) sets Set now uses cooperative dispatch for binary operations so it is possible for non-Set Basic subclasses to override the behaviour of e.g. a + b where one of a or b is an instance of Set. This also means that any non-Set Basic subclasses can not depend on e.g. Set.__add__ to create Union(a, b): if a class is not a subclass of Set and wants to define binary operations with Set it must do so explicitly in its own __add__ method. For classes depending on this this is not a backward compatible change. (#18116 by @oscarbenjamin) other Submodule names are no longer imported with from sympy import *. They can still be imported directly like from sympy import core or accessed like sympy.core, or like sys.modules['sympy.simplify'] for modules that share names with SymPy functions. (#18245 by @oscarbenjamve the T/F assumptions of a symbol or expression (#19155 by @smichr) common_assumptions returns the T/F assumptions in common amongst the given expressions (#19155 by @smichr) Added a refine_matrixelement function (#18681 by @Saanidhyavaeprecated Q.bounded (use Q.finite instead). Deprecated since version 1.0 (issue: #9425) (#18390 by @Smit-create) Removed deprecated Q.infinitesimal (use Q.zero instead). Deprecated since version 1.0 (issue: #9675) (#18390 by @Smit-create) ask(Q.antihermitian()) which earlier generated incorrect results. (#18303 by @czgdp1807) Improved code in ask function using constructs from cnf module. (#18204 by @JSS95 and @mcpl-sympy) Fixed bug in ask function: In case of user-defineus_domain now finds singularities in nested fractions (#19047 by @smichr and @ThomasHickman) singularities has been upgraded to handle more than rational functions (#19047 by @smichr and @ThomasHickman) fixes operations of AccumBounds (#18803 by @Ryand1234) periodicity of exponential functions with a non-zero phase component is now calculated. (#18746 by @mohitacecode) Correct the solution of differentiate_finite for expressions that contain embedded derivatives. (#17881 by @vezeli) Deprecated evaluate argument in differentiate_finite for making non-conservative finite differences. (#17881 by @vezeli) Updated docstrings of maximum, minimum, stationary_points and AccumBounds.intersection (#18581 by @mijo2) Fixes Recursion Error in AccumulationBounds.__pow__ by adding a check on denominator (#18450 by @Smit-create) combinatorics Permutation * PermutationGroup and PermutationGroup * Permutation return Coset. (#19139 by @mohitacecode) Added Coset Class. (#19077 by @mohitacecode and @sylee957) Added SymmetricPermutationGroup Class. (#19077 by @mohitacecode and @sylee957) Added schur number utilities in combinatorics (#18667 by @mijo2 and @slacker404) Raise exception with wrong size in Permutation. (#18587 by @Smit-create) Added Permutation.conjugacy_class and Permutation.conjugacy_classes for computing conjugacy classes in permutation groups. (#18354 by @lucjon and @sachin-4099) Fixed Permutation applying for negative integers. (#18032 by @mrocklin and @sylee957) Added Permutation.apply to use permutation as a symbolic function. (#18032 by @mrocklin and @sylee957) Using Permutation.print_cyclic will raise deprecation warnings (#18033 by @oscarbenjamin, @souravgl0, and @sylee957) Cycle class is no longer mutable and can be regarded as a sparse representation of a permutation (#17973 by @sachin-4099) core BREAKING CHANGE: Basic.has no longer accepts strings as input. For example in SymPy 1.5 you could do Symbol('x').has('x') and the string 'x' passed to has would be sympified to a symbol so that the result would be True. In SymPy 1.6 this will raise an error because the string 'x' can not be sympified using strict sympification. (#19251 by @oscarbenjamin) Mul.is_integer no longer rebuilds arguments into Mul (#19182 by @iammosespaulr) Mul with odd numerator and even denominator is recognized as rational but not integer (#19155 by @smichr) Deprecated sympify automatically converting custom objects with __str__ or __repr__ implemented. (#19006 by @sylee957) when strict=True, as_int will not convert True to 1 (#19054 by @smichr) Support mpmath.matrix in sympify. (#18911 by @smichr and @sylee957) Adds simplification to Pow._eval_nseries resolving incorrect limit evaluation (#18962 by @sachin-4099) doit(deep=False) now evaluates Add and Mul. (#18829 by @JSS95 and @mcpl-sympy) Reduces sensitivity of computation of order terms in Pow._eval_nseries (#18785 by @sachin-4099) Pow.is_zero is fixed for some cases involving infinite (or possibly infinite) expressions. (#18728 by @oscarbenjamin) Now finite and infinite are logical opposites in the old assumptions system so e.g. a Symbol declared with finite=False will have infinite=True. (#18726 by @oscarbenjamin) sympify no longer converts numpy arrays with size to scalars (#18651 by @mijo2 and @NeilGirdhar) __getnewargs__() added to Zero, One, NegativeOne, Half. (#18675 by @mohitacecode) simplification of powers with numerical products in the base is improved (#18650 by @sachin-4099) sqrt(x).is_negative is False when x is real (#18597 by @Smit-create) Add,_eval_as_leading_term() has been fixed (#18340 by @sachin-4099) Updated the definition of atoms method of class Basic (#18532 by @mijo2) basic - sorting in subs is improved so unsorted arguments will prefer replacing more complicated patterns first (e.g. the second derivative before the first derivative). (#18043 by @Psycho-Pirate) Remove deprecated bounded, unbounded and infinitesimal. Deprecated since version 0.7.6 (issue #8071) (#18503 by @Smit-create) Added check for AccumBounds. (#18478 by @smichr and @Smit-create) Adding gmpy in integer_nthroot ( It works only for n < 2**63) (#18380 by @Smit-create) Added new test case for relational (#18416 by @mijo2) Pow._eval_nseries fixed to accept all real exponents. (#18406 by @Smit-create) integer_ntroot and igcd now use gmpy when it is installed (#18276 by @Smit-create) Changed some partial derivatives like diff(f(g(x), h(x)), x) not to have dummy symbols. (#18326 by @sachin-4099) subs now works correctly with partial derivatives. (#18326 by @sachin-4099) Subclass of Function can inherit its nargs attribute to its subclasses. (#18258 by @JSS95 and @mcpl-sympy) Added try-except block in sympy/core/relational.py to handle NotImplementedError and return ConditionSet (#18211 by @Smit-create) Renamed core/evaluate to core/parameters (#18198 by @JSS95, @mcpl-sympy, and @oscarbenjamin) Added global_parameters, which is a thread-local storage for global parameters such as evaluate, distribute, etc. (#18198 by @JSS95, @mcpl-sympy, and @oscarbenjamin) Relational is no longer a subclass of Expr and does not produce nonsensical results in arithmetic operations. This affects all Relational subclasses (Eq, Ne, Gt, Ge, Lt, Le). It is no longer possible to call meaningless Expr methods like as_coeff_Mul on Relational instances. (#18053 by @oscarbenjamin) Expr now uses cooperative dispatch for binary operations so it is possible for non-Expr Basic subclasses to override the behaviour of e.g. a + b where one of a or b is an instance of Expr. This also means that any non-Expr Basic subclasses can not depend on Expr.__add__ to create Add(a, b): if a class is not a subclass of Expr and wants to define binary operations with Expr it must do so explicitly in its own __add__ method. For classes depending on this this is not a backward compatible change. (#18116 by @oscarbenjamin) Added global_evaluate[0] condition in add, sub, mul, div functions in Infinity class. (#18109 by @namannimmo10) Moved .as_poly() from Basic to Expr. (#18094 by @dhruvmendiratta6) Fixed a bug in Factors().as_expr() that led to simplifications that are not generally valid for complex numbers. (Exponents were always multiplied in power-of-a-power situations.) (#18087 by @gschintgen) Fix a regression in 1.5 that allowed expressions to compare equal to strings, and caused == to call str() on the other object. (#18057 by @asmeurer) functions Adjoint of exp and transpose of exp now work as expected. (#19151 by @akirakyle) Adds substitution to _eval_nseries() function of Abs() class resolving incorrect limit evaluations (#19037 by @sachin-4099) expand log term into its prime factors if the factor flag is True. (#18927 by @sbt4104) Evaluate nested floor/ceiling. (#18903 by @sbt4104) Update expand function for binomials. (#18802 by @sbt4104) periodicity of trigonometric functions with a non-zero phase component is now calculated. (#18746 by @mohitacecode) __getnewargs__() and args() added to IdentityFunction. (#18675 by @mohitacecode) Added _eval_nseries() functionality to hyper (#18630 by @dhruvmendiratta6) Fix number of terms in exp._eval_nseries. (#18598 by @mohitacecode) Fixes TypeError while using simplify (#18640 by @Smit-create) Added proportional tolerance for falling factorial test (#18456 by @mijo2) polygamma(n, 1/2) with n a positive integer is automatically evaluated (#18451 by @ethankward) floor and ceiling with float arguments now return Integers (#18424 by @mohitacecode) Sympified output numbers for factorial and binomial used with Mod. (#18339 by @namannimmo10) Maximum recursion depth is no longer exceeded when subfactorial is called on large numbers (#17983 by @sachin-4099) Copy edited the Special submodule to reflect the style guide for Google Season of Docs. (#17844 by @lglattly) geometry Line.bisectors will return the two perpendicular lines, bisecting the angles at the intersection of two linear entities and laying in the same plane as them (#19094 by @Jaime02 and @smichr) Added explicit optional parameters to Polygon and convex_hull (#15757 by @oscargus) Added bisectors method for Polygon class. (#18335 by @namannimmo10) Add __call__ method in Class Curve. (#18250 by @namannimmo10) Point.coordinates was added as a meaningful alias for Point.args (#18213 by @Jaime02) holonomic A cache mismatch error was fixed. (#19248 by @iammosespaulr and @smichr) integrals Handling Float Integrals (#18434 by @Smit-create) Added integration over summation (#18491 by @mijo2) Added extra step to evaluate integral if heurisch() returns None in heurisch_wrapper() (#18153 by @risubaba) Catch ValueError from meijerg() in _inverse_mellin_transform(). (#18141 by @Smit-create) logic boolalg (#18912 by @smichr) to_cnf/to_dnf (when simplify=True) require force=True` if there are more than 8 variables (#18912 by @smichr) simplify_logic recognizes trivial simplified cases (#18912 by @smichr) is_literal can treat Not as literal or not by using the literal_Not flag (#18912 by @smichr) Opposing Relationals are now detected correctly in nested Ands allowing evaluation to False in more cases. (#18811 by @oscarbenjamin) Added a new normal form - ANFform. Function ANFform converts a list of truth values to an expression in Algebraic Normal Form (ANF). (#13686 by @KonstantinTogoi) Added a new method BooleanFunction.to_anf that converts an expression to ANF by equivalent transformations. (#13686 by @KonstantinTogoi) Added a new function is_anf that checks if an expression is ANF. (#13686 by @KonstantinTogoi) Added a new function to_anf that converts an expression to ANF if it is not ANF. (#13686 by @KonstantinTogoi) Added a new function distribute_xor_over_and. Given a sentence s consisting of conjunction and exclusive disjunctions of literals, it returns an equivalent exclusive disjunction. (#13686 by @KonstantinTogoi) Added a new function bool_minterm that returns the k-th minterm of a fixed ordered set of binary variables. (#13686 by @KonstantinTogoi) Added a new function bool_maxterm that returns the k-th maxterm of a fixed ordered set of binary variables. (#13686 by @KonstantinTogoi) Added a new function bool_monomial that returns the k-th monomial of a fixed ordered set of binary variables. (#13686 by @KonstantinTogoi) matrices Fixed matrix creation from the list containg numpy ndarray. (e.g. Matrix([np.array([1, 2]), np.array([1, 2])])) (#19229 by @sylee957) Added is_strongly_diagonally_dominant and is_weakly_diagonally_dominant properties for Matrix. (#19205 by @sylee957) Powers of non-square matrices now always raise an error, even when constructed using MatPow(...). (#19104 by @jlherren) ZeroMatrix will not be logically False. (#19110 by @sbt4104) Added connected_components and connected_components_decomposition for matrix which decomposes a matrix into a block diagonal form. (#19045 by @sylee957) Added todok function to find dictionary of keys format from any dense or sparse matrices. (#19045 by @sylee957) Added BlockDiagMatrix.get_diag_blocks to provide an user API to get diagonal blocks from the matrix. (#19045 by @sylee957) Fixed bug of mpmath.matrix transforming into wrong shape if used to create Matrix. (#18911 by @smichr and @sylee957) Improved eigenvals and eigenvects for floating point matrices using mpmath. (#18911 by @smichr and @sylee957) Some expressions involving OneMatrix are now simplified. (#19009 by @jlherren) Indexing BlockMatrix now more often produces correct results and remains unevaluated if a correct simplification is not possible. (#19007 by @jlherren) Added a function that rotates matrices by 90 degrees (#18953 by @iammosespaulr and @sylee957) sparsetools - _doktocsr now returns a MutableSparseMatrix (#18940 by @smichr) Added Golub Kahan Bidiagonalization with Householder Reflections (#18797 by @sudoWin) Added test_solvers.py file which contains all the solvers-related tests. (#18793 by @guptabhaskar) Added evaluate option to MatAdd and MatMul (#18765 by @JSS95 and @mcpl-sympy) non-square matrices now raise NonSquareMatrixError if inversion is attempted (#18647 by @abhinav28071999) Added test_subspaces.py file which contain all the reductions-related tests. (#18713 by @mohitacecode) Added test_reductions.py file which contain all the reductions-related tests. (#18705 by @mohitacecode) Added test_eigen.py file which contain all the eigen-related tests. (#18690 by @mohitacecode) Added test_decomposition.py file which contain all the decomposition-related tests. (#18685 by @mohitacecode) Added test_determinant.py file which contain all the determinant-related tests. (#18668 by @mohitacecode) Faster Matrix Inverse using Block Matrix (#18608 by @abhinav28071999) Faster Matrix exponentiation using Cayley Hamilton Theorem (#18595 by @abhinav28071999) Fixed BlockDiagMatrix(A).blocks giving a non-block matrix. (#18621 by @abhinav28071999) Added dotprodsimp keyword to MatrixArithmetic.pow (#18600 by @Pristine-Cat) Implemented General Matrix Analytic functions (#18565 by @abhinav28071999) Enabled intermediate matrix product simplification to control expression blowup during certain matrix operations. (#18572 by @Pristine-Cat) (#18147 by @Pristine-Cat) (#18049 by @Pristine-Cat) Added environment variable check SYMPY_DOTPRODSIMP=0 to turn off the new dotprodsimp simplification in case the structure of the new results breaks user code. Should be removed after next live release. (#18572 by @Pristine-Cat) Pulled out and cleaned up many matrix function implementations from matrices.py into individual matrix source files determinant.py, reductions.py, subspaces.py, eigen.py, decompositions.py, solvers.py and inverse.py. (#18564 by @Pristine-Cat) (#18519 by @Pristine-Cat) (#18425 by @Pristine-Cat) (#18420 by @Pristine-Cat) (#18342 by @Pristine-Cat) Immutable matrices return themselves on call to as_immutable(). (#18441 by @Pristine-Cat) Fixed wrapper for NumPy matrices so SymPy iteration and indexing works correctly. (#18160 by @Pristine-Cat) Not backwards compatible: The Matrix.is_zero property has been renamed to Matrix.is_zero_matrix. Matrix.is_zero is now always False. This is because in general is_zero means the number zero so a matrix can never be zero. To get the old behavior of M.is_zero in both old and new versions of sympy use from sympy.core.logic import fuzzy_and; fuzzy_and(m.is_zero for m in M). (#18464 by @sylee957) Added PermutationMatrix and MatrixPermute for matrix permutations. (#18032 by @mrocklin and @sylee957) Fixed FunctionMatrix.replace raising TypeError: 'property' object is not iterable when the function is not a Lambda instance. (#17998 by @sylee957) FunctionMatrix and ElementwiseApplyFunction will always wrap the function inside Lambda. (#17998 by @sylee957) Cleaned up unnecessary slowdown for MatMul.doit when it contains explicit matrices. (#17872 by @sylee957) Fixed MatPow(Inverse(A), 3) and Inverse(MatPow(A, 3)) canonicalized into different objects. (#17872 by @sylee957) Improved inversion of block matrices by selecting an appropriate formula. (#19215 by @jlherren) ntheory the number of digits (like bit length) can now be specified for digits (#18961 by @Arpan612 and @smichr) Corrects the condition for "Extra strong" Lucas pseudoprime (#18946 by @Arpan612 and @sylee957) count_digits works only with numbers (not strings) (#18807 by @smichr) digits is now located in digits instead of factor_ (#18807 by @smichr) implemented elliptic curve (#18682 by @abhinav28071999 and @shikil) added new ntheory module digits.py containing methods related to arithmetic properties of integers (currently, frequency counters for digits of integers, palindromic numbers) (#18659 by @sr-murthy) Made divisor_sigma() symbolically recognize the case: divisor_sigma(a**j*b**k) (#18688 by @sachin-4099) Added multiplicty_in_factorial(p, n) to find the multiplicity of p in n! without calculating the factorial. (#18671 by @sachin-4099) implemented gaussian prime test (#18673 by @abhinav28071999) is_nthpow_residue no longer raises ValueError when a < 0 (#18398 by @abhinav28071999) polynomial_congruence recognizes x**n + a = 0 mod m as a special case (#18398 by @abhinav28071999) Added polynomial_congruence(expr, m) to find values congruent (mod m) to a polynomial (#18294 by @abhinav28071999) is_nthpow_residue handles numbers that are not powers of a primitive root. (#18337 by @abhinav28071999) Fixes nthroot_mod for prime powers (#18274 by @abhinav28071999) nthroot_mod now supports composite moduli (#18199 by @abhinav28071999) Added dra and drm to calculate digital root via addition and multiplication (#16496 by @abhinav28071999 and @smichrinav28071999) Make nthroot_mod , primitive_root and _primitive_root_prime_iter incompatible with composite modulo. (#18194 by @risubaba) In def _sqrt_mod_prime_power(a, p, k): it is assumed that p is a prime number. And this function caled check for zero in is_nthpow_residue. (#18129 by @erdOne) Added proper_divisor and proper_divisor_count functions (#18085 by @adhoc-king and @czgdp1807) Proper exception when accessing index 0 of sieve. (#18013 by @JulienPalard) parsing added support for unary operators: unary plus(+), unary minus(-), pre/post increment(++), pre/post decrement(--) and logical NOT(!) in C parser (#19140 by @smitgajjar) added support for parenthesized expression in C parser (#19140 b as_expr method first to convert the Poly to an Expr. To get a Poly always use as_poly to convert the Expr to a Poly. (#18613 by @oscarbenjamin) DEPRECATION: Passing Poly as the integrand to the integrate function or Integral class is now deprecated. Use the integrate method instead e.g. Poly(x, x).integrate(x) (#18613 by @oscarbenjamin) add condition for f == 0 to Piecewise solution for symbolic quartic polynomials (#18571 by @harsh9200) Fixed polynomial gcd bug (#18566 by @Smit-create) Added check for expressions containing GoldenRatio and TribonacciConstant (#18535 by @Smit-create) Added expand in simplify method of ExpressionDomain (#18472 by @Smit-create) Fixed the issue of cancel not expanding the product of irrational conjugates and added Tests (#18448 by @iamabhishek0) Prevent creation of CC from changing the context of RealElement. (#18312 by @V1krant) Changes in Poly.__new__() to make it handle simplified Matrix (#18159 by @Smit-create) interpolate will no longer return nan when x is a supplied coordinate (#18030 by @smichr) interpolating_poly will raise an error if x is not symbolic (#18030 by @smichr) interpolating_poly will raise an error if X or Y depend on x (#18030 by @smichr) interpolating-poly will now use only the first n points in X and Y (#18030 by @smichr) Added KSY_precondition() to test for the Kapur-Saxena-Yang precondition (#17974 by @ctsiagkalis) Added get_KSY_Dixon_resultant() and auxiliary methods for computing the KSY approach to Dixon's Resultant (#17974 by @ctsiagkalis) printing the inverse hyperbolic functions now respect the inv_trig_style printer setting (#19235 by @eric-wieser) Fixed numpy printer raising error for unevaluated numeric power. (#19170 by @sylee957) Fixed IdentityFunction printing for LaTeX. (#19032 by @sylee957) Added parenthesize_super option to LatexPrinter. (#18256 by @JSS95 and @mcpl-sympy) Removing python2 support from PythonCodePrinter (#18381 by @Smit-create) Added support for airy functions in the SciPyPrinter class. (#18908 by @OmarWagih1) allowed ReprPrinter to maintain original expr order via turning ordering off (#18777 by @leerobert) Fix lambdify with Min for arrays of more than one dimension (#18774 by @sbt4104) Fixed MatMul with complex coefficients raising error when printed. (#18744 by @sylee957) fixes incorrect parenthesizes in latex print of integral (#18772 by @Ryand1234) fixes nested differentiation problem in latex format (#18740 by @Ryand1234) added Python printer for KroneckerDelta (#18185 by @m93a) Added min and max options for printers thod of undetermined coefficients. (#18410 by @Mohitbalwani26) Fixed checkodesol for some cases when the solution returned by variation of parameters was correct but chekodesol couldn't simplify it. (#18376 by @Mohitbalwani26) Fixed dsolve for some cases of linear non-homogeneous ODEs when using the method of undetermined coefficients. (#18309 by @Mohitbalwani26) Changed return type from None to [], as in #18199 the return type of nth_root was changed when all_root = True and no root exists (#18285 by @abhinav28071999) ode.py - solve function is used to express the equation in factorised form (#18214 by @Mohitbalwani26 and @smichr) Fixed a bug in diophantine where negative coefficients could lead to incomplete sction with permute=True. (#18200 by @gschintgen) The diophantine solver no longer raises for unsympified inputs. (#18201 by @oscarbenjamin) fixed a bug in diophantine when using permute=True which caused incomplete permutations to be returned (#18189 by @abhinav28071999) diophantine.py - fixed bug where AttributeError was raised in some cases. (#18167 by @Mohitbalwani26) Solving of hyperbolic equations improved in solveset. (#14053 by @gschintgen, @ishanaj, @oscarbenjamin, and @oscargus) Copy edited solvers.py to reflect the style guide for Google Season of Docs. (#17921 by @lglattly) stats Allowing the user to define custom distributions (#19123 by @Smit-create) Added coskewness (#18935 by @Smit-create) Added sampling methods for discrete random variables (#18289 by @Smit-create) Added median function. (#18300 by @Smit-create) Updated some documentation in NormalGamma and JointRV functions (#18589 by @akash9712 8336 by @Smit-create) Fixed domain bug in probability method of ContinuousPspace in sympy/stats/crv.py (#18311 by @Smit-create) Added Bernoulli Process in sympy/stats/stochastic_process_types.py (#18173 by @Smit-create) Added Heger bound (#18605 by @Smit-create) Implemented derivatives with respect to symbols in tensor expressions (#18093 by @joha2 and @Upabjojr) Implemented derivatives with respect to tensors in tensor expressions (#18093 by @joha2 and @Upabjojr) Added _eval_simplify method for class ImmutableDenseNDimArray (#18369 by @iamabhishek0) Fixing bug in replacing indices in PartialDerivative tensor objects. (#18242 by @Upabjojr) Tensor module: refactory to allow mixing PartialDerivative and TensAdd. (#18224 by @Upabjojr) Fix PartialDerivative operator to correctly handle the valence (covariant/contravariant) of the deriving variable. (#18166 by @Upabjojr) .dummy_fmt changed to .dummy_name (#17518 by @drybalka) metric parameter for TensorIndexType is now split into 2 optional parameters metric_name and metric_symmetry (#17518 by @drybalka) TensorIndexType.dim is now a symbol and not None (#17518 by @drybalka) utilities Overflow condition and negative argument for 'ibin' added (#18973 by @Arpan612) iterables - uniq will now raise a RuntimeError if a size change of the sequence is detected (#18835 by @smichr) iterables now includes is_palindromic to check if a sequence (or slice thereof) is palindromic (#18807 by @smichr) iterables: generate_derangements now handles unsorted input correctly (#18810 by @smichr) Code for the test runner is moved to a new sympy.testing package. (#18095 by @oscarbenjamin) lambdify: avoid using scipy versions of numpy functions, which are deprecated, in lambdify. (#18080 by @sylee957) other Replace inspect.getargspec with getfullargspec (#18784 by @sethtroisi) Updated README to include details about how to install SymPy using PyPI (#18518 by @mijo2) Corrected an inconsistency in the "Advanced Expression Manipulation" section of the tutorial. (#18287 by @Smit-create) Submodule names are no longer imported with from sympy import *. They can still be imported directly like from sympy import core or accessed like sympy.core, or like sys.modules['sympy.simplify'] for modules that share names with SymPy functions. (#18245 by @oscarbenjamin) README.rst - Added the codecov Badge in readme.rst (#18266 by @Mohitbalwani26) updated the README.rst and doc/README.rst with links to the SymPy Documentation Style Guide. (#17922 by @lglattly)
math/py-sympy: Update to 1.5.1 Changes: - Fix a regression in 1.5 that allowed expressions to compare equal to strings, and caused == to call str() on the other object. - Avoid using scipy versions of numpy functions, which are deprecated, in lambdify. Take MAINTAINERship.
all: migrate homepages from http to https pkglint -r --network --only "migrate" As a side-effect of migrating the homepages, pkglint also fixed a few indentations in unrelated lines. These and the new homepages have been checked manually.
math/py-sympy: Update to 1.5 Breaking changes: - Deprecate is_EmptySet in favor of is_empty. - Lambda now requires a tuple rather than a list for the signature argument (non-tuple iterables are deprecated) - Eq(expr) now raises ValueError. Eq(expr, 0) should be used instead. - Refactory of the units module. Scale factors and dimensions are now both global and relative to single unit systems. - get_dixon_matrix() now computes only the necessary monomials for the Dixon matrix. - The ProductSet of no sets is no longer the empty set. Instead is the set consisting of the empty tuple. - Deprecated tensorhead() and tensorsymmetry() static methods. - Rational, irrational, transcendental and algebraic now imply finite in the assumptions system. This means that all symbols declared as rational, integer, odd etc are now automatically assumed finite. - In the (old) assumptions, complex=True now implies finite=True. Note that the default assumption for Symbol is complex=None, which allows for the possibility for it to be infinite. - The assumptions system is changed so that only finite numbers can be considered real, positive, negative, nonnegative, nonpositive or nonzero (since nonzero implies real). This means that any symbol declared with e.g. real=True is now automatically considered finite. It also means that infinities can not be considered positive or negative since they are not real (e.g. oo.is_positive is now False). - New assumptions extended_real, extended_positive etc are added that allow for positive and negative infinity. The equivalent of Symbol('x', real=True) in version 1.4 is now Symbol('x', extended_real=True). The equivalent of Symbol('x', negative=False) is now Symbol('x', extended_negative=False) although it is usually better to use Symbol('x', nonnegative=True) (which implies both real=True and finite=True as well). Code that previously checked if x.is_positive should now be written as if x.is_extended_positive if it is intended that infinities should be allowed. - Numbers still compare the same as they do in Python (Float(1) == 1) except when they appear in an Expression, e.g. x**2.0 != x**2
math/py-sympy: Update to 1.4 Highlights: * Logic expressions with relations can now be simplifed in a better way which has impact on e.g. simplification of piecewise expressions. * The MathML Presentation printer has seen a major improvement with support configuration and about a hundred new functions. * Union and Intersection have been improved to, among other improvements, support Python sets. * The test procedure has been changed to include code coverage and code quality checks leading to a number of issues being identified and removed. * Unicode support, especially for Python 2.7, has been improved. * subs and Subs have been improved in a number of ways. * SymPy objects now renders as LaTeX automatically in Jupyter notebooks. init_printing is still required to LaTeX render non-SymPy objects such as lists of expressions or Python ints.
math/py-sympy: Update to 1.3 Backwards compatibility breaks and deprecations: * Symbols no longer automatically convert to functions when called, e.g., if f = Symbol('f'), f(t) is now a TypeError. To create a function, use f = Function('f') or f = symbols('f', cls=Function). * .integrate() has been renamed to .compute_expectation() in sympy.stats in order to avoid confusion with the integrals module. * classof() and a2idx() in sympy.matrices.matrices have been deprecated in favor of the same functions in sympy.matrices.common. * The source() function has been deprecated. Use inspect.getsource or ?? in IPython. See the release notes for the full list of changes. https://github.com/sympy/sympy/wiki/release-notes-for-1.3
Update py-sympy to 1.2 Highlights There are many changes in 1.2 (see below). Some of the highlights are * Python 3.3 is no longer supported. If you require Python 3.3 support, use SymPy 1.1.1. See our [518]policy on dropping support for major Python versions. * Experimental LaTeX parsing with sympy.parsing.latex.parse_latex() has been added, based on the latex2sympy project. This requires antlr-python-runtime to be installed. [519]#13706 * The vector module has been improved to support orthogonal curvilinear coordinate systems ([520]Szymon Mieszczak's GSoC project) * New module sympy.integrals.intpoly for integrating uni/bivariate polynomials over 2-polytopes. ([521]Arif Ahmed's GSoC project) * Improvements to the code generation module. ([522]Bj?rn Dahlgren's GSoC project) * Improvements to the group theory module. See below for more information. ([523]Valeriia Gladkova's GSoC project) * New module sympy.discrete for operating on discrete sequences. polynomials over 2-polytopes. ([521]Arif Ahmed's GSoC project) * Improvements to the code generation module. ([522]Bj?rn Dahlgren's GSoC project) * Improvements to the group theory module. See below for more information. ([523]Valeriia Gladkova's GSoC project) * New module sympy.discrete for operating on discrete sequences. ([524]Sidhant Nagpal's GSoC project) Complete release notes at: https://github.com/sympy/sympy/wiki/release-notes-for-1.2
py-sympy: update to 1.1.1 Changes 1.1.1: Units ----- Fix an issue with the Quantity Add postprocessor in Python 3.6. Support functions with quantities and dimensions. Fix addition of a quantity and a number. Workaround power of a quantity. Fix SI prefix definitions Core ---- Fix the Add/Mul postprocessor logic for subclasses. Fix various recursion issues in the Add assumptions that prevented isympy from working with the cache off. Fix some test failures on 32-bit systems. Allow for complex NumPy scalars in sympify. Code generation --------------- Only call asarray in lambdify on Python builtin numeric types. Fixes lambdify for array subclasses such as xarray. Fix using preprocessor_statements kwarg in CCodeGen. Matrices -------- Fix stacking of empty matrices. Other ----- Build the docs with the latest version of Sphinx. Fixes the search functionality being broken in the docs. Fix the language classifiers in setup.py
Remove unnecessary PLIST_SUBST and FILES_SUBST that are now provided by the infrastructure. Mark a couple more packages as not ready for python-3.x.
Switch to egg.mk. Fix PLIST for python-3.x.
Update py-sympy to 1.0 Release Notes for 1.0 Major changes As a 1.0 release, there are some major changes, many of which are breaking. See also the "backwards compatibility breaks and deprecations" section below. mpmath is now a hard external dependency for SymPy. sympy.mpmath will no longer work (use import mpmath). See http://docs.sympy.org/latest/install.html#mpmath for more information on how to install mpmath. The galgebra Geometric Algebra module has been removed. The module is now maintained separately at https://github.com/brombo/galgebra. The new solveset function is a planned replacement for solve. solve is not yet deprecated, since solveset hasn't yet fully replicated all the functionality of solve. solveset offers an improved interface to solve. See http://docs.sympy.org/latest/modules/solvers/solveset.html for more information on solveset vs. solve. This will be the last version of SymPy to support Python 2.6 and 3.2. Both of these Python versions have reached end-of-life. Support for other Python versions will continue at least until they have reached end-of-life. Backwards compatibility breaks and deprecations In sympy.geometry, Line.equal() has been deprecated in favor of Line.equals(). The dup_inner_subresultants and dmp_inner_subresultants now only return 2 arguments instead of 3. Only those building their own routines from these very low-level functions need to be aware of this. This release doesn't include copy of the mpmath library, see PR #2192. Please see new installation instructions for SymPy. The release no longer includes the galgebra subumodule. This module is now maintained separately at https://github.com/brombo/galgebra. See PR #10046. ClassRegistry is deprecated. It's unlikely that anybody ever used it; it is scheduled for removal for the next version of SymPy after 1.0. sympy.C is deprecated and scheduled for removal after 1.0, too. For those users who followed some erroneous SymPy documentation and used C as in C.log, just import sympy and use sympy.log instead: this is compatible with SymPy before and after we remove C. Q.bounded has been deprecated. Use Q.finite instead. Q.infinity has been deprecated. Use Q.infinite instead. Q.infinitesimal has been deprecated. Use Q.zero instead. ask(Q.nonzero(non-real)) now returns False. Note that Q.nonzero is equivalent to ~Q.zero & Q.real. If you intend to find whether x is a non-zero number irrespective of the fact that x is real or not, you should use ask(~Q.zero(x)). x.is_nonzero now returns True iff x is real and has a non-zero value. If you intend to find whether x is a non-zero number irrespective of the fact that x is real or not, you should use fuzzy_not(x.is_zero). isprime(Float) now returns False. ask(Q.integer(Float)) now returns False. ask(Q.prime(Float)) now returns False. ask(Q.composite(Float)) now returns False. ask(Q.even(Float)) now returns False. ask(Q.odd(Float)) now returns False. New features The module sympy.series.ring_series has been updated. New methods for series inversion, expansion of hyperbolic and inverse functions, etc have been added. PR #9262 New module sympy.series.sequences for generating finite/infinite lazily evaluated lists. [PR #9435] The string representation function srepr() now displays the assumptions used to create a Symbol. For example, srepr(Symbol('x', real=True)) now returns the string "Symbol('x', real=True)" instead of merely "Symbol('x')". not_empty_in function added to util.py in calculus module which finds the domain for which the FiniteSet is not-empty for a given Union of Sets. [PR #9779] A new and fast method rs_series has been added for calculating series expansions. It can handle multivariate Puiseux series with symbolic coefficients. It is especially optimized for large series, with speedup over the older series method being in the range 20-1000 times. PR #9775 In [37]: %timeit rs_series(cos(a+b*a**QQ(3,2)), a, 10) 100 loops, best of 3: 5.59 ms per loop In [38]: %timeit cos(a+b*a**QQ(3,2)).series(a, 0, 10) 1 loops, best of 3: 997 ms per loop Complex Sets has been added here: sympy.sets.fancysets, use S.Complexes for singleton ComplexRegion class. PR #9463 GeometryEntity now subclasses from sets.Set, so sets.Intersection and sets.Union can be used with GeometryEntitys. For example Intersection(Line((-1,-1),(1,1)), Line((-1,1), (1,-1))) == FiniteSet(Point2D(0,0)). New module sympy.series.fourier for computing fourier sine/cosine series. [PR #9523] Linsolve: General Linear System Solver in sympy.solvers.solveset, use linsolve() for solving all types of linear systems. PR #9438 New assumption system is now able to read the assumptions set over Symbol object. For e.g.: In [7]: x = Symbol('x', positive=True) In [8]: ask(Q.positive(x)) Out[8]: True A new handler system has been added as sympy.assumptions.satask which uses satisfiable to answer queries related to assumptions. In case the legacy ask doesn't know the answer, it falls back on satask. For e.g. Earlier >>> ask(Q.zero(x) | Q.zero(y), Q.zero(x*y)) >>> ask(Implies(Q.zero(x), Q.zero(x*y))) >>> ask(Q.zero(x) | Q.zero(y), Q.nonzero(x*y)) Now >>> ask(Q.zero(x) | Q.zero(y), Q.zero(x*y)) True >>> ask(Implies(Q.zero(x), Q.zero(x*y))) True >>> ask(Q.zero(x) | Q.zero(y), Q.nonzero(x*y)) False New module sympy.series.formal for computing formal power series. [PR #9639] New set class ConditionSet was implemented. [PR #9696] Differential calculus Methods, like is_increasing, is_monotonic, etc were implemented in sympy.calculus.singularities in [PR #9820] New module sympy.series.limitseq for finding limits of terms containing sequences. [PR #9836] New module sympy/polys/subresultants_qq_zz.py :: contains various functions for computing Euclidean, Sturmian and (modified) subresultant polynomial remainder sequences in Q[x] or Z[x]. All methods are based on the recently discovered theorem by Pell and Gordon of 1917 and an extension/generalization of it of 2015. [PR #10374] Minor changes limit(sin(x), x, oo) now returns AccumulationBound object instead of un-evaluated sin(oo). Implemented in [PR #10051]. Point is now an n-dimensional point and subclassed to Point2D and Poin3D where appropriate. Point is also now enumerable and can be indexed (e.g., x=Point(1,2,3); x[0]) roots_cubic will no longer raise an error when the sign of certain expressions is unknown. It will return a generally valid solution instead. Relational.canonical will put a Relational into canonical form which is useful for testing whether two Relationals are trivially the same. Relational.reversed gives the Relational with lhs and rhs reversed and the symbol updated accordingly (e.g. (x < 1).reversed -> 1 > x Simplification of Relationals will, if the threshold for simplification is met, also return the Relational in canonical form. One of the criteria of being in canonical form is that the Number will be on the rhs. This makes writing tests a little easier so S(1) > x can be entered as 1 > x or x < 1 (the former being turned into the latter by Python). boolalg functions And, Or, Implies, Xor, Equivalent are aware of Relational complements and trivial equalities, so, for example, And(x=1) will reduce to False while And(S(1)>x,x<1) reduces to x < 1. This leads to some simplifications in statistical expressions. Polynomials created using ring now accept negative and fractional exponents. For e.g, In [1]: R, x, y = ring('x, y', QQ) In [2]: x**(-2) + y**Rational(2,3) Out[2]: y**(2/3) + x**(-2) The function used to test connectivity in Min and Max has been altered to use the weaker form of a relationship since this applies to arguments like floor(x) and x: though, in generally, we cannot say that floor(x) < x, if x is real we do know that floor(x) <= x. This allows Min(x, floor(x)) -> floor(x) without loss of generality when x is real. Float has changed its default behaviour on string/int/long to use at least 15 digits of precision and to increase the precision automatically. This enables sympify('1.23456789012345678901234567890') to return a high-precision Float. It also means N('1.23456789012345678901234567890', 20) does the right thing (where it previously lost precision because an intermediate calculation had only precision 15). See Issue #8821 The unicode pretty printer now uses a compact single-character square root symbol for simple expressions like sqrt(x) and sqrt(17). You can disable this new behaviour with pprint(sqrt(2), use_unicode_sqrt_char=False). ask(Q.finite(x), Q.infinite(x)) now returns False. You can now read the definition of assumption predicates in the docs. ask(Q.composite(1)) now returns False. exp(expr) won't simplify automatically based on assumptions on expr. Autosimplification works for numbers and Symbol, though. You'll have to call refine on exp for simplification. Idx objects can now be summation variables of Sum and Product. The keyword argument of GramSchmidt was renamed from "orthog" to "orthonormal". This is because GramSchmidt always returns an orthogonal set of vectors but only if that argument is True does it return an orthonormal set of vectors. RootOf now has a new subclass ComplexRootOf (abbreviated CRootOf). All currently defined functionality is in the subclass. There is a new function rootof with the same call interface as that of RootOf. It will create objects of CRootOf. New code should use rootof instead of RootOf which is planned to become an abstract class. The vector module has a new function orthogonalize which applies the Gram Schmidt orthogonalization on a sequence of linearly independent vectors and returns a sequence of orthogonal (or orthonormal) vectors. The projection method has been added to compute the vector (or scalar) projection of one vector on another vector. (See https://github.com/sympy/sympy/pull/10474#) Update by K.I.A.Derouiche in PR pkg/51270
Update to 0.7.6.1, based on PR 50382 by derouiche. 0.7.6.1 This is a small bugfix release over SymPy 0.7.6, primarily to fix issues with printing in the Jupyter notebook. Changes Fix pretty printing in the Jupyter notebook and Jupyter qtconsole for Jupyter 4.0. The deprecated linearization method in the mechanics module no longer fails to execute. 0.7.6 Major changes New module calculus.finite_diff for generating finite difference formulae approximating derivatives of arbitrary order on arbitrarily spaced grids. New module physics.optics for symbolic computations related to optics. geometry module now supports 3D geometry. Support for series expansions at a point other then 0 or oo. See PR #2427. Rules for the intersection of integer ImageSets were added. See PR #7587. We can now do things like {2⋅m | m ∊ ℤ} ∩ {3⋅n | n ∊ ℤ} = {6⋅t | t ∊ ℤ} and {2⋅m | m ∊ ℤ} ∩ {2⋅n + 1 | n ∊ ℤ} = ∅ dsolve module now supports system of ODEs including linear system of ODEs of 1st order for 2 and 3 equations and of 2nd order for 2 equations. It also supports homogeneous linear system of n equations. New support for continued fractions, including iterators for partial quotients and convergents, and reducing a continued fraction to a Rational or a quadratic irrational. Support for Egyptian fraction expansions, using several different algorithms. Addition of generalized linearization methods to physics.mechanics. Use an LRU cache by default instead of an unbounded one. See PR #7464. Control cache size by the environment variable SYMPY_CACHE_SIZE (default is 500). SYMPY_CACHE_SIZE=None restores the unbounded cache. Added fastcache as an optional dependency. Requires v0.4 or newer. Control via SYMPY_CACHE_SIZE. May result in significant speedup. See PR #7737. New experimental module physics.unitsystems for computation with dimensions, units and quantities gathered into systems. This opens the way to dimensional analysis and better quantity calculus. The old module physics.units will stay available until the new one reaches a mature state. See PR #2628. New Complement class to represent relative complements of two sets. See Pr #7462. New trigonometric functions (asec, acsc), many enhancements for other trigonometric functions (PR #7500). New Contains class to represent the relation "is an element of" (see PR #7989). The code generation tools (code printers, codegen, autowrap, and ufuncify) have been updated to support a wider variety of constructs, and do so in a more robust way. Major changes include added support for matrices as inputs/outputs, and more robust handling of conditional (Piecewise) statements. ufuncify now uses a backend that generates actual numpy.ufuncs by default through the use of the numpy C api. This allows broadcasting on all arguments. The previous cython and f2py backends are still accessible through the use of the backend kwarg. CodeGen now generates code for Octave and Matlab from SymPy expressions. This is supported by a new CodePrinter with interface octave_code. For example octave_code(Matrix([[x**2, sin(pi*x*y), ceiling(x)]])) gives the string [x.^2 sin(pi*x.*y) ceil(x)]. New general 3D vector package at sympy.vector. This package provides a 3D vector object with the Del, gradient, divergence, curl, and operators. It supports arbitrary rotations of Cartesian coordinate systems and arbitrary locations of points. Backwards compatibility breaks and deprecations All usage of inequalities (>, >=, <, <=) on SymPy objects will now return SymPy's S.true or S.false singletons instead of Python's True or False singletons. Code that checks for, e.g., (a < b) is True should be changed to (a < b) == True or (a < b) == S.true. Use of is is not recommended here. The subset() method in sympy.core.sets is marked as being deprecated and will be removed in a future release (issue). Instead, the is_subset() method should be used. Previously, if you compute the series expansion at a point other than 0, the result was shifted to 0. Now SymPy returns the usual series expansion, see PR #2427. In physics.mechanics, KanesMethod.linearize has a new interface. Old code should be changed to use this instead. See docstring for information. physics.gaussopt has been moved to physics.optics.gaussopt. You can still import it from the previous location but it may result in a deprecation warning. This is the last release with the bundled mpmath library. In the next release you will have to install this library from the official site. Previously lambdify would convert Matrix to numpy.matrix by default. This behavior is being deprecated, and will be completely phased out with the release of 0.7.7. To use the new behavior now set the modules kwarg to [{'ImmutableMatrix': numpy.array}, 'numpy']. If lambdify will be used frequently it is recommended to wrap it with a partial as so: lambdify = functools.partial(lambdify, modules=[{'ImmutableMatrix': numpy.array}, 'numpy']). For more information see #7853 and the lambdify doc string. Set.complement doesn't exists as an attribute anymore. Now we have a method Set.complement(<universal_set>) which complements the given universal set. Removed is_finite assumption (see #7891). Use instead a combination of "is_bounded and is_nonzero" assumptions. is_bounded and is_unbounded assumptions were renamed to is_finite and is_infinite (see #7947). Removed is_infinitesimal assumption (see #7995). Removed is_real property for Sets, use set.is_subset(Reals) instead (see #7996). For generic symbol x (SymPy's symbols are not bounded by default), inequalities with oo are no longer evaluated as they were before, e.g. x < oo no longer evaluates to True). See #7861. CodeGen has been refactored to make it easier to add other languages. The main high-level tool is still utilities.codegen.codegen. But if you previously used the Routine class directly, note its __init__ behaviour has changed; the new utilities.codegen.make_routine is recommended instead and by default retains the previous C/Fortran behaviour. If needed, you can still instantiate Routine directly; it only does minimal sanity checking on its inputs. See #8082. FiniteSet([1, 2, 3, 4]) syntax not supported anymore, use FiniteSet(1, 2, 3, 4) instead See #7622. Minor changes Updated the parsing module to allow sympification of lambda statements to their SymPy equivalent. Lambdify can now use numexpr by specifying modules='numexpr' Use with evaluate(False) context manager to control automatic evaluation. E.g. with evaluate(False): x + x is actually x + x, not 2*x IndexedBase and Indexed are changed to be commutative by default sympy.core.sets moved to sympy.sets Changes in sympy.sets: Infinite Range is now allowed. See PR #7741 is_subset(): The is_subset() method deprecates the subset() method. self.is_subset(other) checks if self is a subset of other. This is different from self.subset(other), which checked if other is a subset of self. is_superset(): A new method is_superset() method is now available. self.is_superset(other) checks if self is a superset of other. is_proper_subset and is_proper_superset: Two new methods allow checking if one set is the proper subset and proper superset of another respectively. For eg. self.is_proper_subset(other) and self.is_proper_superset(other) checks if self is the proper subset of other and if self is the proper superset of other respectively. is_disjoint(): A new method for checking if two sets are disjoint. powerset(): A new method powerset() has been added to find the power set of a set. The cardinality of a ProductSet can be found using the len() function. Changes in sympy.plot.plot_implicit: The plot_implicit function now also allows explicitly specifying the symbols to plot on the X and Y axes. If not specified, the symbols will be assigned in the order they are sorted. The plot_implicit function also allows axes labels for the plot to be specified. rules for simplification of ImageSet were added PR#7625. As a result {x | x ∊ ℤ} now simplifies to ℤ and {sin(n) | n ∊ {tan(m) | m ∊ ℤ}} automatically simplifies to {sin(tan(m)) | m ∊ ℤ} coth(0) now returns Complex Infinity. See #7634 dioptre is added to physics.units #7782 replace now respects commutativity #7752 The CCodePrinter gracefully handles Symbols which have string representations that match C reserved words. #8199 limit function now returns an unevaluated Limit instance if it can't compute given limit, see #8213 0.7.5 Major changes The version of mpmath included in SymPy has been updated to 0.18. New routines for efficiently compute the dispersion of a polynomial or a pair thereof. Fancy indexing of matrices is now provided, e.g. A[:, [1, 2, 5]] selects all rows and only 3 columns. Enumeration of multiset partitions is now based on an implementation of Algorithm 7.1.2.5M from Knuth's The Art of Computer Programming. The new version is much faster, and includes fast methods for enumerating only those partitions with a restricted range of sizes, and counting multiset partitions. (See the new file sympy.utilities.enumerative.py.) distance methods were added to Line and Ray to compute the shortest distance to them from a point. The normal_lines method was added to Ellipse to compute the lines from a point that strike the Ellipse at a normal angle. inv_quick and det_quick were added as functions in solvers.py to facilitate fast solution of small symbolic matrices; their use in solve has reduced greatly the time needed to solve such systems. solve_univariate_inequality has been added to sympy.solvers.inequalities.py. as_set attribute for Relationals and Booleans has been added. Several classes and functions strictly associated with vector calculus were moved from sympy.physics.mechanics to a new package sympy.physics.vector. (PRs #2732 #2862 #2894) New implementation of the Airy functions Ai and Bi and their derivatives Ai' and Bi' (called airyai, airybi, airyaiprime and airybiprime, respectively). Most of the usual features of SymPy special function are present. Notable exceptions are Gruntz limit computation helpers and meijerg special functions integration code. Euler-Lagrange equations (function euler_equations) in a new package sympy.calculus (PR #2431). Minor changes Some improvements to the gamma function. generate_bell now generates correct permutations for any number of elements. It is no longer necessary to provide nargs to objects subclassed from Function unless an eval class method is not defined. (If eval is defined, the number of arguments will be inferred from its signature.) geometric Point creation will be faster since simplification is done only on Floats Some improvements to the intersection method of the Ellipse. solutions from solve of equations involving multiple log terms are more robust idiff can now return higher order derivatives Added to_matrix() method to sympy.physics.vector.Vector and sympy.physics.dyadic.Dyadic. (PR #2686). Printing improvements for sympy.physics.vector objects and mechanics printing. (PRs #2687, #2728, #2772, #2862, #2894) Functions with LaTeX symbols now print correct LaTeX. (PR #2772) init_printing has several new options, including a flag print_builtin to prevent SymPy printing of basic Python types (PR #2683), and flags to let you supply custom printers (PR #2894). improvements in evaluation of imageset for Intervals (PR #2723). Set properties to determine boundary and interior (PR #2744). input to a function created by lambdify no longer needs to be flattened. Backwards compatibility breaks and deprecations the submatrix method of matrices was removed; access the functionality by providing slices or list of rows/columns to matrix directly, e.g. A[:, [1, 2]]. Matrix([]) and Matrix([[]]) now both return a 0x0 matrix terms_gcd no longer removes a -1.0 from expressions extract_multiplicatively will not remove a negative Number from a positive one, so (4*x*y).extract_multiplicatively(-2*x) will return None. the shape of the result from M.cross(B) now has the same shape as matrix M. The factorial of negative numbers is now zoo instead of 0. This is consistent with the definition factorial(n) = gamma(n + 1). 1/0 returns zoo, not oo (PR #2813). zoo.is_number is True (PR #2823). oo < I raises TypeError, just as for finite numbers (PR #2734). 1**oo == nan instead of 1, better documentation for Pow class (PR #2606).
Update to 0.7.4.1: 0.7.4.1 These are the release notes for SymPy 0.7.4.1, which was released on December 15, 2013. This version of SymPy has been tested on Python 2.6, 2.7, 3.2, 3.3, and PyPy. This was a small bugfix release to fix an import issue on Windows (https://github.com/sympy/sympy/issues/2681). 0.7.4 These are the release notes for SymPy 0.7.4, which was released on December 9, 2013. This version of SymPy has been tested on Python 2.6, 2.7, 3.2, 3.3, and PyPy. Major changes Python 3 SymPy now uses a single code-base for Python 2 and Python 3. Geometric Algebra The internal representation of a multivector has been changes to more fully use the inherent capabilities of SymPy. A multivector is now represented by a linear combination of real commutative SymPy expressions and a collection of non-commutative SymPy symbols. Each non-commutative symbol represents a base in the geometric algebra of an N-dimensional vector space. The total number of non-commutative bases is 2**N - 1 (N of which are a basis for the vector space) which when including scalars give a dimension for the geometric algebra of 2**N. The different products of geometric algebra are implemented as functions that take pairs of bases symbols and return a multivector for each pair of bases. The LaTeX printing module for multivectors has been rewritten to simply extend the existing sympy LaTeX printing module and the sympy LaTeX module is now used to print the bases coefficients in the multivector representation instead of writing an entire LaTeX printing module from scratch. The main change in the geometric algebra module from the viewpoint of the user is the inteface for the gradient operator and the implementation of vector manifolds: The gradient operator is now implemented as a special vector (the user can name it grad if they wish) so the if F is a multivector field all the operations of grad on F can be written grad*F, F*grad, grad^F, F^grad, grad|F, F|grad, grad<F, F<grad, grad>F, and F>grad where **, ^, |, <, and > are the geometric product, outer product, inner product, left contraction, and right contraction, respectively. The vector manifold is defined as a parametric vector field in an embedding vector space. For example a surface in a 3-dimensional space would be a vector field as a function of two parameters. Then multivector fields can be defined on the manifold. The operations available to be performed on these fields are directional derivative, gradient, and projection. The weak point of the current manifold representation is that all fields on the manifold are represented in terms of the bases of the embedding vector space. Classical Cryptography Implements: Affine ciphers Vigenere ciphers Bifid ciphers Hill ciphers RSA and "kid RSA" linear feedback shift registers. Common Subexpression Elimination (CSE) Major changes have been done in cse internals resulting in a big speedup for larger expressions. Some changes reflect on the user side: Adds and Muls are now recursively matched ([w*x, w*x*y, w*x*y*z] ǹow turns into [(x0, w*x), (x1, x0*y)], [x0, x1, x1*z]) CSE is now not performed on the non-commutative parts of multiplications (it avoids some bugs). Pre and post optimizations are not performed by default anymore. The optimizations parameter still exists and optimizations='basic' can be used to apply previous default optimizations. These optimizations could really slow down cse on larger expressions and are no guarantee of better results. An order parameter has been introduced to control whether Adds and Muls terms are ordered independently of hashing implementation. The default order='canonical' will independently order the terms. order='none' will not do any ordering (hashes order is used) and will represent a major performance improvement for really huge expressions. In general, the output of cse will be slightly different from the previous implementation. Diophantine Equation Module This is a new addition to SymPy as a result of a GSoC project. With the current release, following five types of equations are supported. Linear Diophantine equation, a_{1}x_{1} + a_{2}x_{2} + . . . + a_{n}x_{n} = b General binary quadratic equation, ax^2 + bxy + cy^2 + dx + ey + f = 0 Homogeneous ternary quadratic equation, ax^2 + by^2 + cz^2 + dxy + eyz + fzx = 0 Extended Pythagorean equation, a_{1}x_{1}^2 + a_{2}x_{2}^2 + . . . + a_{n}x_{n}^2 = a_{n+1}x_{n+1}^2 General sum of squares, x_{1}^2 + x_{2}^2 + . . . + x_{n}^2 = k Unification of Sum, Product, and Integral classes A new superclass has been introduced to unify the treatments of indexed expressions, such as Sum, Product, and Integral. This enforced common behavior accross the objects, and provides more robust support for a number of operations. For example, Sums and Integrals can now be factored or expanded. S.subs() can be used to substitute for expressions inside a Sum/Integral/Product that are independent of the index variables, including unknown functions, for instance, Integral(f(x), (x, 1, 3)).subs(f(x), x**2), while Sum.change_index() or Integral.transform are now used for other changes of summation or integration variables. Support for finite and infinite sequence products has also been restored. In addition there were a number of fixes to the evaluation of nested sums and sums involving Kronecker delta functions, see issue 3924 and issue 3987. Series The Order object used to represent the growth of a function in series expansions as a variable tend to zero can now also represent growth as a variable tend to infinity. This also fixed a number of issues with limits. See issue 234 and issue 2670. Division by Order is disallowed, see issue 1756. Addition of Order object is now commutative, see issue 1180. Physics Initial work on gamma matrices, depending on the tensor module. Logic New objects true and false which are Basic versions of the Python builtins True and False. Other Arbitrary comparisons between expressions (like x < y) no longer have a boolean truth value. This means code like if x < y or sorted(exprs) will raise TypeError if x < y is symbolic. A typical fix of the former is if (x < y) is True (assuming the if block should be skipped if x < y is symbolic), and of the latter is sorted(exprs, key=default_sort_key), which will order the expressions in an arbitrary, but consistent way, even across platforms and Python versions. See issue 2832. Arbitrary comparisons between complex numbers (for example, I > 1) now raise TypeError as well (see PR #2510). minpoly now works with algebraic functions, like minpoly(sqrt(x) + sqrt(x + 1), y). exp can now act on any matrix, even those which are not diagonalizable. It is also more comfortable to call it, exp(m) instead of just m.exp(), as was required previously. sympify now has an option evaluate=False that will not automatically simplify expressions like x+x. Deep processing of cancel and simplify functions. simplify is now recursive through the expression tree. See e.g. issue 3923. Improved the modularity of the codebase for potential subclasses, see issue 3652. The SymPy cheatsheet was cleaned up. Backwards compatibility breaks and deprecations Removed deprecated Real class and is_Real property of Basic, see issue 1721. Removed deprecated 'each_char' option for symbols(), see issue 1919. The viewer="StringIO" option to preview() has been deprecated. Use viewer="BytesIO" instead. See issue 3984. TransformationSet has been renamed to ImageSet. Added public facing imageset function. 0.7.3 These are the release notes for SymPy 0.7.3, which was released on July 13, 2013. It can be downloaded from https://github.com/sympy/sympy/releases/tag/sympy-0.7.3. This version of SymPy has been tested on Python 2.5, 2.6, 2.7, 3.2, 3.3, and PyPy. Major changes Integration This release includes Risch integration algorithm from Aaron Meurer's 2010 Google Summer of Code project. This makes integrate much more powerful and much faster for the supported functions. The algorithm is called automatically from integrate(). For now, only transcendental elementary functions containing exp or log are supported. To access the algorithm directly, use integrate(expr, x, risch=True). The algorithm has the ability to prove that integrals are nonelementary. To determine if a function is nonelementary, integrate using risch=True. If the resulting Integral class is an instance of NonElementaryIntegral, then it is not elementary (otherwise, that part of the algorithm has just not been implemented yet). Here is an example integral that could not be computed before: >>> f = x*(x + 1)*(2*x*(x - (2*x**3 + 2*x**2 + x + 1)*log(x + 1))*exp(3*x**2) + (x**2*exp(2*x**2) - log(x + 1)**2)**2)/((x + 1)*log(x + 1)**2 - (x**3 + x**2)*exp(2*x**2))**2 >>> integrate(f, x) x + x*exp(x**2)*log(x + 1)/(x**2*exp(2*x**2) - log(x + 1)**2) - log(x + 1) - log(exp(x**2) - log(x + 1)/x)/2 + log(exp(x**2) + log(x + 1)/x)/2 ODE Built basic infrastructure of the PDE module (PR #1970) Theano Interaction SymPy expressions can now be translated into Theano expressions for numeric evaluation. This includes most standard scalar operations (e.g. sin, exp, gamma, but not beta or MeijerG) and matrices. This system generally outperforms lambdify and autowrap but does require Theano to be installed. Matrix Expressions Assumptions Matrix expressions now support inference using the new assumptions system. New predicates include invertible, symmetric, positive_definite, orthogonal, .... New Operators New operators include Adjoint, HadamardProduct, Determinant, MatrixSlice, DFT. Also, preliminary support exists for factorizations like SVD and LU. Context manager for New Assumptions Added the with assuming(*facts) context manager for new assumptions. See blogpost Backwards compatibility breaks and deprecations This is the last version of SymPy to support Python 2.5. The IPython extension, i.e., %load_ext sympy.interactive.ipythonprinting is deprecated. Use from sympy import init_printing; init_printing() instead. See issue 3914. The viewer='file' option to preview without a file name is deprecated. Use filename='name' in addition to viewer='file'. See issue 3919. The deprecated syntax Symbol('x', dummy=True), which had been deprecated since 0.7.0, has been removed. Use Dummy('x') or symbols('x', cls=Dummy) instead. See issue 3378. The deprecated Expr methods as_coeff_terms and as_coeff_factors, which have been deprecated in favor of as_coeff_mul and as_coeff_add, respectively (see also as_coeff_Mul and as_coeff_Add), were removed. The methods had been deprecated since SymPy 0.7.0. See issue 3377. The spherical harmonics have been completely rewritten. See PR #1510. Minor changes Solvers Added enhancements and improved the methods of solving exact differential equation ((PR #1955)) and ((PR #1823)) Support for differential equations with linear coefficients and those that can be reduced to separable and linear form ((PR #1940), (PR #1864), (PR #1883)) Support for first order linear general PDE's with constant coefficients ((PR #2109)) Return all found independent solutions for underdetermined systems. Handle recursive problems for which y(0) = 0. Handle matrix equations. Integration integrate will split out integrals into Piecewise expressions when conditions must hold for the answer to be true. For example, integrate(x**n, x) now gives Piecewise((log(x), Eq(n, -1), (x**(n + 1)/(n + 1), True)) (previously it just gave x**(n + 1)/(n + 1)) Calculate Gauss-Legendre and Gauss-Laguerre points and weights (PR #1497) Various new error and inverse error functions (PR #1703) Use in heurisch for more symmetric and nicer results Gruntz for expintegrals and all new erf* Li, li logarithmic integrals (PR #1708) Integration of li/Li by heurisch (PR #1712) elliptic integrals, complete and incomplete Integration of complete elliptic integrals by meijerg Integration of Piecewise with symbolic conditions. Fixed many wrong results of DiracDelta integrals. Logic Addition of SOPform and POSform functions to sympy.logic to generate boolean expressions from truth tables. Addition of simplify_logic function and enabling simplify() to reduce logic expressions to their simplest forms. Addition of bool_equals function to check equality of boolean expressions and return a mapping of variables from one expr to other that leads to the equality. Addition of disjunctive normal form methods - to_dnf, is_dnf Others gmpy version 2 is now supported Added is_algebraic_expr() method (PR #2176) Many improvements to the handling of noncommutative symbols: Better support in simplification functions, e.g. factor, trigsimp Better integration with Order() Better pattern matching Improved pattern matching including matching the identity. normalizes Jacobi polynomials Quadrature rules for orthogonal polynomials in arbitrary precision (hermite, laguerre, legendre, gen_legendre, jacobi) summation of harmonic numbers Many improvements of the polygamma functions evaluation at special arguments Connections to harmonic numbers structured full partial fraction decomposition (mainly interesting for developers) besselsimp improvements Karr summation convention New spherical harmonics improved minimal_polynomial using composition of algebraic numbers (PR #2038) faster integer polynomial factorization (PR #2148) Euler-Descartes method for quartic equations (PR #1947) algebraic operations on tensors (PR #1700) tensor canonicalization (PR #1644) Handle the simplification of summations and products over a KroneckerDelta. Implemented LaTeX printing of DiracDelta, Heaviside, KroneckerDelta and LeviCivita, also many Matrix expressions. Improved LaTeX printing of fractions, Mul in general. IPython integration and printing issues have been ironed out. Stats now supports discrete distributions (e.g. Poisson) by relying on Summation objects Added DOT printing for visualization of expression trees Added information about solvability and nilpotency of named groups.
Update to 0.7.2 Upstream changes: Release Notes for 0.7.2New Page Edit Page Page History These are the release notes for SymPy 0.7.2. SymPy 0.7.2 was released on October 16, 2012. Major Changes Python 3 support SymPy now supports Python 3. The officially supported versions are 3.2 and 3.3, but 3.1 should also work in a pinch. The Python 3-compatible tarballs will be provided separately, but it is also possible to download Python 2 code and convert it manually, via the bin/use2to3 utility. See the README for more PyPy support All SymPy tests pass in recent nightlies of PyPy, and so it should have full support as of the next version after 1.9. Combinatorics A new module called Combinatorics was added which is the result of a successful GSoC project. It attempts to replicate the functionality of Combinatorica and currently has full featured support for Permutations, Subsets, Gray codes and Prufer codes. In another GSoC project, facilities from computational group theory were added to the combinatorics module, mainly following the book "Handbook of computational group theory". Currently only permutation groups are supported. The main functionalities are: basic properties (orbits, stabilizers, random elements...), the Schreier-Sims algorithm (three implementations, in increasing speed: with Jerrum's filter, incremental, and randomized (Monte Carlo)), backtrack searching for subgroups with certain properties. Definite Integration A new module called meijerint was added, which is also the result of a successful GSoC project. It implements a heuristic algorithm for (mainly) definite integration, similar to the one used in Mathematica. The code is automatically called by the standard integrate() function. This new algorithm allows computation of important integral transforms in many interesting cases, so helper functions for Laplace, Fourier and Mellin transforms were added as well. Random Variables A new module called stats was added. This introduces a RandomSymbol type which can be used to model uncertainty in expressions. Matrix Expressions A new matrix submodule named expressions was added. This introduces a MatrixSymbol type which can be used to describe a matrix without explicitly stating its entries. A new family of expression types were also added: Transpose, Inverse, Trace, and BlockMatrix. ImmutableMatrix was added so that explicitly defined matrices could interact with other SymPy expressions. Sets A number of new sets were added including atomic sets like FiniteSet, Reals, Naturals, Integers, UniversalSet as well as compound sets like ProductSet and TransformationSet. Using these building blocks it is possible to build up a great variety of interesting sets. Classical Mechanics A physics submodule named machanics was added which assists in formation of equations of motion for constrained multi-body systems. It is the result of 3 GSoC projects. Some nontrivial systems can be solved, and examples are provided. Quantum Mechanics Density operator module has been added. The operator can be initialized with generic Kets or Qubits. The Density operator can also work with TensorProducts as arguments. Global methods are also added that compute entropy and fidelity of states. Trace and partial-trace operations can also be performed on these density operators. To enable partial trace operations a Tr module has been added to the core library. While the functionality should remain same, this module is likely to be relocated to an alternate folder in the future. One can currently also use sympy.core.Tr to work on general trace operations, but this module is what is needed to work on trace and partial-trace operations on any sympy.physics.quantum objects. The Density operators, Tr and Partial trace functionality was implemented as part of student participation in GSoC 2012 Expanded angular momentum to include coupled-basis states and product-basis states. Operators can also be treated as acting on the coupled basis (default behavior) or on one component of the tensor product states. The methods for coupling and uncoupling these states can work on an arbitrary number of states. Representing, rewriting and applying states and operators between bases has been improved. Commutative Algebra A new module agca was started which seeks to support computations in commutative algebra (and eventually algebraic geometry) in the style of Macaulay2 and Singular. Currently there is support for computing Groebner bases of modules over a (generalized) polynomial ring over a field. Based on this, there are algorithms for various standard problems in commutative algebra, e.g., computing intersections of submodules, equality tests in quotient rings, etc.... Plotting Module A new plotting module has been added which uses Matplotlib as its back-end. The plotting module has functions to plot the following: 2D line plots 2D parametric plots. 2D implicit and region plots. 3D surface plots. 3D parametric surface plots. 3D parametric line plots. Differential Geometry Thanks to a GSoC project the beginning of a new module covering the theory of differential geometry was started. It can be imported with sympy.diffgeom. It is based on "Functional Differential Geometry" by Sussman and Wisdom. Currently implemented are scalar, vector and form fields over manifolds as well as covariant and other derivatives.
"user-destdir" is default these days
Remove python24 and all traces of it from pkgsrc. Remove devel/py-ctypes (only needed by and supporting python24). Remove PYTHON_VERSIONS_ACCEPTED and PYTHON_VERSIONS_INCOMPATIBLE lines that just mirror defaults now. Miscellaneous cleanup while editing all these files.
update to 0.7.1 This is a major update, many additions and improvements. Dropped Python-2.4 support.
Let's assume for now that everything that worked with python-2.6 also works with python-2.7.
update to 0.6.7, from Kamel Derouiche per PR pkg/43731 changes: -implement visual factorint() -implement symarray(): numpy array of sympy symbols -misc fixes and improvements
update to 0.6.6 many fixes and improvements, too much to list here
update to 0.6.5 This is a major update - many extensions and improvements.
Sort PYTHON_VERSIONS_ACCEPTED.
uses decorators -> Python>=2.4
Add DESTDIR support.
update to 0.5.15 changes: feature extensions and fixes
import py-sympy-0.5.14, a Python library for symbolic calculations
Initial revision