#16739: is_weak_popov
-------------------------------------+-------------------------------------
Reporter: ketzu | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone: sage-6.4
Component: linear algebra | Resolution:
Keywords: matrix weak- | Merged in:
popov-form #16742 | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | 7b56085920bd58a400f9e3f97c0e544333ac12f8
u/ketzu/is_weak_popov | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by ketzu):
Some simple measures for the change from list comprehension (probably more
"pythonic") to double loops:
list comprehension:[[BR]][[BR]]sage: PF =
!PolynomialRing(GF(2!^32,'a'),'x')[[BR]][[BR]]sage: A =
random_matrix(PF,400,400,degree=10)[[BR]]sage: %timeit
A.is_weak_popov()[[BR]]1 loops, best of 3: 7.57 s per loop
sage: B = random_matrix(PF,10,10,degree=800)[[BR]]sage: %timeit
B.is_weak_popov()[[BR]]1000 loops, best of 3: 554 µs per loop
----
loops[[BR]][[BR]]sage: A = random_matrix(PF,400,400,degree=10)[[BR]]sage:
%timeit A.is_weak_popov()[[BR]]1000 loops, best of 3: 251 µs per
loop[[BR]]sage: A.is_weak_popov()[[BR]]False[[BR]][[BR]]sage: for x in
range(A.nrows()):[[BR]]....: A[x,x] = A[x,x].shift(11)[[BR]]....:
[[BR]]sage: A.is_weak_popov()[[BR]]True[[BR]]sage: %timeit
A.is_weak_popov()[[BR]]10 loops, best of 3: 69.1 ms per loop
sage: B = random_matrix(PF,10,10,degree=800)[[BR]]sage: %timeit
B.is_weak_popov()[[BR]]100000 loops, best of 3: 8.73 µs per
loop[[BR]]sage: B.is_weak_popov()[[BR]]False[[BR]][[BR]]sage: for x in
range(B.nrows()):[[BR]]....: B[x,x] =
B[x,x].shift(801)[[BR]]....:[[BR]]# Now it's in wpf[[BR]]sage: %timeit
B.is_weak_popov()[[BR]]10000 loops, best of 3: 46.7 µs per loop[[BR]]sage:
B.is_weak_popov()[[BR]]True[[BR]]
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=654a51dee30c9125de49548b61bbd86cf176d0bc
654a51d]||{{{Only changed comment linebreaks.}}}||
||[http://git.sagemath.org/sage.git/commit/?id=7b56085920bd58a400f9e3f97c0e544333ac12f8
7b56085]||{{{Added linebreaks to documentation, reworked listcomprehension
into loops for efficiency, added more testcases.}}}||
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=654a51dee30c9125de49548b61bbd86cf176d0bc
654a51d]||{{{Only changed comment linebreaks.}}}||
||[http://git.sagemath.org/sage.git/commit/?id=7b56085920bd58a400f9e3f97c0e544333ac12f8
7b56085]||{{{Added linebreaks to documentation, reworked listcomprehension
into loops for efficiency, added more testcases.}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/16739#comment:18>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.