Finally removed old sympy.polynomials module

2008-11-23 Thread Mateusz Paprocki
Hi, the last missing piece - factorization routines for univariate and multivariate polynomials, was finally added to sympy.polys. This way all functionality provided by the old polynomials module is now available in sympy.polys. As a consequence sympy.polynomials can be safely removed - which i

[PATCH] Renamed poly_factors to poly_root_factors

2008-11-23 Thread Mateusz Paprocki
This change is needed to implement the proper poly_factors, which main purpose will be to compute factorization into irreducibles over Q[x] or Q[X]. Later poly_root_factors will be merged with new poly_factors. --- sympy/integrals/risch.py |5 +++-- sympy/polys/__init__.py

[PATCH] Implemented gf_{from,to}_int_poly functions

2008-11-23 Thread Mateusz Paprocki
This functionality will be needed in sympy/polys/integerpolys.py to convert GF(p)[x] to Z[x] and Z[x] to GF(p)[x]. --- sympy/polys/galoispolys.py|9 + sympy/polys/tests/test_galoispolys.py | 11 +-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/

[PATCH] Removed dead and useless code from galoispolys.py

2008-11-23 Thread Mateusz Paprocki
The code removed with this patch shouldn't have been committed at all with the original commit. If someone would like to play with Newton division, it's always possible to checkout that commit. --- sympy/polys/galoispolys.py| 83 + sympy/polys/tests/t

[PATCH] Implemented k-subsets generator

2008-11-23 Thread Mateusz Paprocki
This function was in fact a part of zassenhaus() in sympy/polynomials/fast/intpoly.py, but can be useful elsewhere. Added docstring and tests. --- sympy/utilities/__init__.py |3 ++- sympy/utilities/iterables.py| 25 + sympy/utilities/tests/te

[PATCH] Simplified code in gf_factor (use gf_sqf)

2008-11-23 Thread Mateusz Paprocki
Now gf_factor uses gf_sqf to compute square-free decomposition of a polynomial and then factors each part independently using gf_factor_sqf. This approach is much simpler than the original one and should be faster, especially for large input and modulus, because now Shoup's DDF can be used insete

[PATCH] Removed Polynomial from printing tests

2008-11-23 Thread Mateusz Paprocki
--- sympy/printing/tests/test_repr.py |6 +- sympy/printing/tests/test_str.py |6 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/sympy/printing/tests/test_repr.py b/sympy/printing/tests/test_repr.py index 897726e..71f7788 100644 --- a/sympy/printing/tests/tes

[PATCH] Refactored kronecker_mv() and factor() functions

2008-11-23 Thread Mateusz Paprocki
Kronecker's method for factorization of multivariate polynomials was rewritten to use Poly and new Z[x] factorization code. This way kronecker_mv() seems reasonable for small input, e.g.: In [1]: %time factor(x**10 - y**10) CPU times: user 16.05 s, sys: 0.17 s, total: 16.22 s Wall time: 16.52 s O

[PATCH] Reimplemented factoring utilities over Z[x]

2008-11-23 Thread Mateusz Paprocki
This patch reimplements univariate polynomials over integers and factorization algorithm over this domain. The module was written to match galoispolys.py design. All functionality available in polynomials/fast/intpoly.py was moved to the new module. All subroutines (especially zzx_mod_gcd) use fu

[PATCH] Use poly_factors() in rootfinding.py instead of old factor()

2008-11-23 Thread Mateusz Paprocki
--- sympy/polys/rootfinding.py | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sympy/polys/rootfinding.py b/sympy/polys/rootfinding.py index 2697d3a..fdfe413 100644 --- a/sympy/polys/rootfinding.py +++ b/sympy/polys/rootfinding.py @@ -8,6 +8,7 @@ from sym

[PATCH] Fixed and improved gf_{edf,ddf}_shoup docstrings

2008-11-23 Thread Mateusz Paprocki
--- sympy/polys/galoispolys.py | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/sympy/polys/galoispolys.py b/sympy/polys/galoispolys.py index 2833ec2..cd2c018 100644 --- a/sympy/polys/galoispolys.py +++ b/sympy/polys/galoispolys.py @@ -849,6 +849,9 @@ def gf_ddf_s

Re: Don't track vim backup files

2008-11-23 Thread Vinzent Steinberg
+1 But why using these backup files? If something crashes for me, there is usually a relatively recent swap file which can be restored. Vinzent On Nov 22, 9:49 pm, [EMAIL PROTECTED] wrote: > From: Fabian Seoane <[EMAIL PROTECTED]> > > --- >  .gitignore |    1 + >  1 files changed, 1 insertions(

Re: Finally removed old sympy.polynomials module

2008-11-23 Thread Ondrej Certik
On Sun, Nov 23, 2008 at 12:17 PM, Mateusz Paprocki <[EMAIL PROTECTED]> wrote: > > Hi, > > the last missing piece - factorization routines for univariate > and multivariate polynomials, was finally added to sympy.polys. > > This way all functionality provided by the old polynomials > module is now

Re: Don't track vim backup files

2008-11-23 Thread Fabian Seoane
Vinzent Steinberg wrote: > +1 > > But why using these backup files? If something crashes for me, there > is usually a relatively recent swap file which can be restored. well actually these are not vim backup files but gedit backup files. I corrected that in my proposed branch, thanks > > Vinz

Re: [PATCH] move all py.test imports into try/except clause (#1210)

2008-11-23 Thread Ondrej Certik
On Fri, Nov 21, 2008 at 11:14 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > This is important, because the new py.test breaks sympy (import py works, but > not the later imports). This patch should fix it. > --- > sympy/utilities/pytest.py |9 - > 1 files changed, 4 insertions(+), 5

Re: [PATCH] move all py.test imports into try/except clause (#1210)

2008-11-23 Thread Fabian Seoane
Ondrej Certik wrote: > This is important, because the new py.test breaks sympy (import py works, but > not the later imports). This patch should fix it. > --- > sympy/utilities/pytest.py |9 - > 1 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/sympy/utilities/pytest.

Re: [PATCH] Reimplemented factoring utilities over Z[x]

2008-11-23 Thread Fabian Seoane
Nice work! Couple of questions: what does zzx stand for? Wouldn't this be the case (lot's of functions with the same prefix) where you should use a class and the methods should be static methods (instead of using prefixes all the time)? Mateusz Paprocki wrote: > This patch reimplements univar

[PATCH] Support for more types of expressions in solve

2008-11-23 Thread fabian . seoane
From: Fabian Seoane <[EMAIL PROTECTED]> For this, a guess_solve_strategy method was added Before of this, solve() parsed the expression searching for a polynomial and if this parse failed, it just called tsolve. Now the expression is parsed, and while parsing the best algorithm is selected for

[PATCH] Avoid one nesting by reordering a if/else block. This does not change the behaviour of the code, it just makes it more readable

2008-11-23 Thread fabian . seoane
From: Fabian Seoane <[EMAIL PROTECTED]> Also fixes a docstring that caused test_doc to fail and some formatting typos where corrected --- sympy/solvers/solvers.py| 167 ++- sympy/solvers/tests/test_solvers.py | 27 +++--- 2 files changed, 97 insert

[PATCH] Support for more types of expressions in solve

2008-11-23 Thread fabian . seoane
From: Fabian Seoane <[EMAIL PROTECTED]> For this, a guess_solve_strategy method was added Before of this, solve() parsed the expression searching for a polynomial and if this parse failed, it just called tsolve. Now the expression is parsed, and while parsing the best algorithm is selected for

[PATCH] Avoid one nesting by reordering a if/else block. This does not change the behaviour of the code, it just makes it more readable

2008-11-23 Thread fabian . seoane
From: Fabian Seoane <[EMAIL PROTECTED]> --- sympy/solvers/solvers.py | 161 +++--- 1 files changed, 80 insertions(+), 81 deletions(-) diff --git a/sympy/solvers/solvers.py b/sympy/solvers/solvers.py index 6a9daf4..0c2bff1 100644 --- a/sympy/solvers/solve

Re: [PATCH] Avoid one nesting by reordering a if/else block. This does not change the behaviour of the code, it just makes it more readable

2008-11-23 Thread Fabian Seoane
[EMAIL PROTECTED] wrote: > From: Fabian Seoane <[EMAIL PROTECTED]> > > Also fixes a docstring that caused test_doc to fail and some formatting typos > where corrected > --- > sympy/solvers/solvers.py| 167 > ++- > sympy/solvers/tests/test_solvers.py

Re: [PATCH] Reimplemented factoring utilities over Z[x]

2008-11-23 Thread Mateusz Paprocki
On Sun, Nov 23, 2008 at 09:27:05PM +0100, Fabian Seoane wrote: > > Nice work! > Thanks. > Couple of questions: what does zzx stand for? > zzx stands for univariate polynomial over integers --- Z[x]. The double 'z' is used in many algebra systems, so I stay compatible with those systems (also