Re: entropy of RSA/DSA keys? Was: Re: [sage-devel] trac is overloaded?

2012-07-07 Thread David Roe
Off the top of my head I don't know how to phrase it in terms of entropy, but the density of semiprimes (ie RSA moduli) is about log log x / log x (see http://mathoverflow.net/questions/35927/asymptotic-density-of-k-almost-primesfor references and more results). At 2048 bits this gives a density

Re: [sage-devel] Fwd: A gotcha in Sage?

2012-07-09 Thread David Roe
That is indeed a bug. A fix is up for review at http://trac.sagemath.org/sage_trac/ticket/13218, along with 100% doctest coverage of laurent_series_ring (which caught a few other bugs too). David On Mon, Jul 9, 2012 at 4:27 AM, John Cremona wrote: > sage: R, x = PowerSeriesRing(ZZ, 'x', default

Re: [sage-devel] How to correct this bug in power series substitution?

2012-07-10 Thread David Roe
> The reason is that the generic method subs iterates the generators of R > (in this case x) and checks whether any keyword matches the string > representation of that generator. But > > x._repr_() > > does not give 'x', but 0.0... + 1.0... x. > > There are two obvious ways to fix this: Change _rep

Re: [sage-devel] Re: "hg blame" with Sage versions?

2012-07-21 Thread David Roe
roed$ blamer sage/rings/finite_rings/finite_field_base.pyx hg: parse error at 24: unexpected token: end Traceback (most recent call last): File "/usr/bin/blamer", line 22, in print "%s%s"%(lookup(l[:c]),l[c:]), File "/usr/bin/blamer", line 14, in lookup "--template","{tags}"]) File "

Re: [sage-devel] Doc test failures

2012-07-24 Thread David Roe
Try installing the new doctesting code at #12415 and running sage -t --debug sage/combinat/tableau_tuple.py It will drop you into an iPython prompt when the error occurs (or a python debugger if there's an unexpected error). You should be able to skip most of the patches and dependencies, which ha

Re: [sage-devel] Units in Orders

2012-08-12 Thread David Roe
> Thanks for the pointer to that ticket, which explains the change in the the > "is_unit()" behavior. > > Why should the inverse of "four" succeed when the result is not in K? > > sage: four^-1 in K > False The order K is analogous to the ring of integers inside QQ. So even though the inverse of

Re: [sage-devel] Parent with facade

2012-08-19 Thread David Roe
I don't know if there's a ticket, but one way to fix it is to make the following two lines of parent.Parent.__init__ else: category = Category.join((category, Sets().Facades())) into if category is None: category = Sets().Facades()

Re: [sage-devel] Re: creating a local patch

2012-08-30 Thread David Roe
> > What in particular was bothersome about github? I don't remember all the details, but I think having to deal with both trac and github got very tiresome. We don't want to move completely to github since we have a bunch of existing tickets and progress on trac. So we decided to try making git

Re: [sage-devel] Removing sage/structure/element_verify.py?

2012-09-25 Thread David Roe
I agree that this file should be removed. The verification that it's doing should be performed by TestSuite now. We should ensure that all of the conditions checked in this file are still checked when running the TestSuite on ring elements, module elements, etc. David On Tue, Sep 25, 2012 at 1:1

[sage-devel] Data loss in TinyMCE cells

2012-09-26 Thread David Roe
Hi everyone, I'm teaching a computational number theory course this semester and am using Sage worksheets for the assignments. I just lost a bunch of comments on a student's homework, and I wanted to describe how it happened so that someone more familiar with the sagenb codebase can tell me if the

Re: [sage-devel] Re: Data loss in TinyMCE cells

2012-10-02 Thread David Roe
Thanks for the replies. When I open another worksheet as admin, I can't execute any cells. So it looks like problem #3. David On Wed, Sep 26, 2012 at 4:36 AM, Jason Grout wrote: > On 9/26/12 2:00 AM, David Roe wrote: > >> Hi everyone, >> I'm teaching a computation

Re: [sage-devel] Re: Removing pickles from the pickle jar?

2012-10-15 Thread David Roe
> Here is my vote: You may add stuff to the pickle jar. But please do not > remove stuff from the pickle jar. > +1 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to sage-devel@googlegroups.com. To unsubscribe fr

Re: [sage-devel] setup.py

2012-10-16 Thread David Roe
> As for packages, I see no reason to not auto-generate it. (Perhaps we > could have an excludes parameter if need be.) > +1 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to sage-devel@googlegroups.com. To unsu

[sage-devel] Line continuations in doctests, changing files in sage/tests

2012-10-24 Thread David Roe
Hi everyone, I'm working on #12415 and am revising the methods for continuing lines. Currently you can continue a line with the standard python ..., which looks good in standard Python doctests since it has the same length as >>>, but doesn't look at nice in Sage. After #12415 the doctesting code

Re: [sage-devel] Re: Line continuations in doctests, changing files in sage/tests

2012-10-24 Thread David Roe
On Wed, Oct 24, 2012 at 3:45 AM, Simon King wrote: > Hi David, > > On 2012-10-24, David Roe wrote: > > 1. Are there any objections to continuing to allow this backslash > notation? > > At least not from me. > > > 2. Are there any opinions on whether we should

Re: [sage-devel] Groups and ParentWithGens vs. Parent

2012-10-27 Thread David Roe
I haven't tried, but I fully support moving it to the new-style Parent. David On Sat, Oct 27, 2012 at 2:56 PM, Volker Braun wrote: > Right now sage.groups.group.Group class (base for all groups) derives from > the deprecated ParentWithGens. Has anybody tried to change it to derive the > new-styl

Re: [sage-devel] Bug in functions sin, cos, exp...

2012-10-30 Thread David Roe
I think this is a bug: the type of the result should be consistent. David On Tue, Oct 30, 2012 at 3:54 PM, mmarco wrote: > There is an inconsistency in the behaviour of the cosine function > sage: type(cos(1)) > > sage: type(cos(pi)) > > sage: type(cos(0)) > > > It also happens with the sine:

Re: [sage-devel] Bug in functions sin, cos, exp...

2012-10-31 Thread David Roe
Fair enough. I don't really have an objection to an Integer output. And I'll certainly defer to people who actually work on that part of Sage. :-) David On Wed, Oct 31, 2012 at 4:01 AM, Volker Braun wrote: > On Tuesday, October 30, 2012 11:08:15 PM UTC, Fredrik Johansson wrote: > >> Returnin

Re: [sage-devel] Groups and ParentWithGens vs. Parent

2012-11-02 Thread David Roe
I think I'm to blame: we had plans for implementing generators in a certain way with the transition to the new coercion model. I'll work on #5768 this weekend and report back. In the mean time, manually implementing a gens() method is fine: if I get sage.structure.generators working correctly the

Re: [sage-devel] Split a polynomial in several parts

2012-11-04 Thread David Roe
This is the kind of problem that you'll get huge speedups by using Cython and NTL directly rather than Python lists. For example, here's a prototype (not tested and probably buggy). In particular, I don't know if you can destruct a ZZ_pEX_c that has been created with ZZ_pEX_new, and I'm not sure

Re: [sage-devel] pickling question

2012-11-10 Thread David Roe
You don't define comparison, so it defaults to comparing id(self). David On Sat, Nov 10, 2012 at 1:18 PM, John H Palmieri wrote: > I wrote what I think is a simple class (see > http://trac.sagemath.org/sage_trac/ticket/13131), but it fails pickling > tests: > >sage: loads(dumps(T)) == T # f

Re: [sage-devel] pickling question

2012-11-10 Thread David Roe
No problem. Want to help me figure out what's wrong with interrupt.pyx in #12415? ;-) David On Sat, Nov 10, 2012 at 5:20 PM, John H Palmieri wrote: > Oh, right. Fixed now. Thanks. > > John > > > > On Saturday, November 10, 2012 4:09:25 PM UTC-8, David Roe wr

Re: [sage-devel] Ascii Output

2012-11-12 Thread David Roe
Maxima will use ascii-art to print expressions ( http://www.sagemath.org/doc/reference/sage/interfaces/maxima.html), but it will just leave sqrt as sqrt. I don't know a way to get an ascii art representation for sqrt. David On Mon, Nov 12, 2012 at 8:22 AM, Andreas Ruscheinski < andreas.ruschein.

Re: [sage-devel] Re: Combining finite/rational fields

2012-11-17 Thread David Roe
I don't think Sage currently supports localizations, though it would make a nice project for a student David On Sun, Nov 18, 2012 at 12:10 AM, Dima Pasechnik wrote: > On 2012-11-18, Michael Orlitzky wrote: > > I just opened, > > > > http://trac.sagemath.org/sage_trac/ticket/13720 > > > >

[sage-devel] Sage's signal handler + Python multiprocessing

2012-11-24 Thread David Roe
Hi everyone, Working on #12415 (new doctesting framework) led me to the issue tracked at #13748. I'm not sure whether I'm doing something wrong if there's a problem with Sage's signal handler. Putting the following code in your init.sage causes a segfault in a child process: import multiprocessi

Re: [sage-devel] High level architectural design document of Sage

2012-12-03 Thread David Roe
On Sun, Dec 2, 2012 at 11:59 PM, charles Bouillaguet < charles.bouillag...@gmail.com> wrote: > I still think that MAGMA's "handbook" is easier to browse than SAGE's > reference manual (both are supposed to exhaustively describe all the > functions in the system). One reason for that is probably th

Re: [sage-devel] Re: JMM 2013 Sage Booth

2012-12-04 Thread David Roe
I too can help out at the booth, and a free registration would be awesome. I'm giving one talk and plan on attending some others, but I'll certainly be spending a substantial amount of time at the Sage booth. As for equipment, there's been talk recently about a bootable USB thumb drive with Sage o

Re: [sage-devel] Sage Notebook broken in my fresh installation

2012-12-17 Thread David Roe
It looks like a permissions error on that file. Does the user you're running Sage as have permission to open '/home/knsam/.sage/sage_ notebook.sagenb/home/admin/history.pickle'? What does ls -l /home/knsam/.sage/sage_notebook.sagenb/home/admin/history.pickle report? David On Sun, Dec 16, 2012 a

Re: [sage-devel] Sage Notebook broken in my fresh installation

2012-12-17 Thread David Roe
sagenb/home/admin/history.pickle > > But, how do I fix this, chmod? > > On Tue, Dec 18, 2012 at 1:58 AM, David Roe wrote: > >> ls -l /home/knsam/.sage/sage_notebook.sagenb/home/admin/history.pickle >> > > -- > You received this message because you are subscribed to the

Re: [sage-devel] Inconsitent output of the domain for the automorphism group of graph?

2012-12-28 Thread David Roe
In the long term, I think the right solution is to copy what is done for Galois groups of number fields: depending on a keyword option to automorphism_group(), we should return either the abstract permutation group (as is done now) or a group equipped with an action on the edges and vertices of the

Re: [sage-devel] LaurentPolynomials appears to be horribly broken!?

2013-02-13 Thread David Roe
> I was just discussing this with a few people at the sage days at ICERM and > it seems that LaurentPolynomials are horribly broken. I don't think much work has been put into Laurent polynomials since the initial implementation. Improvements are welcome! > Consider the following in 5.6: > > sa

Re: [sage-devel] Re: Remove misleading test "check_old_coerce"?

2013-02-14 Thread David Roe
Having Ring derive from parent_old.Parent was the intermediate state Robert put in after Dev Days 1 so that we could gradually transition rings to the new coercion model (after deciding doing the whole transition in one step was a bad idea). Of course, it has been almost 5 years and we're not done

Re: [sage-devel] Re: negative integers have negative bits?

2013-02-15 Thread David Roe
The two functions are doing something completely different: one is generating a string representation that can be reinput into python, and the other is generating a list of digits (base 2) for further manipulation. I think our current behavior is perfectly acceptable, though adding more documentat

Re: [sage-devel] New parallel docbuilder (#6495) ready

2013-02-19 Thread David Roe
Sounds fantastic! For those of us running with only one core, will these two processes increase the buildtime by a factor of two? Or is there a single process option similar to the old system? David On Tue, Feb 19, 2013 at 4:13 AM, Jeroen Demeyer wrote: > Sage-5.8.beta0 will contain a new driv

Re: [sage-devel] Strange bug (or "feature") in relative number fields

2013-02-19 Thread David Roe
I'm fairly sure the problem is that the defining polynomial for the relative extension is not monic. One solution would be to use an equivalent monic polynomial and keep track of a simple transformation allowing one to translate between the internal representation of elements on the one hand and p

Re: [sage-devel] Good Manners?

2013-02-20 Thread David Roe
I think that's fine. Tickets can have multiple reviewers. It's probably good to give an explanation of why you're changing the status in a comment. David On Wed, Feb 20, 2013 at 9:04 AM, Kannappan Sampath wrote: > Hello!! > > Is it considered good manners to change the status of a (needs_revie

Re: [sage-devel] gcd regression (?)

2013-02-20 Thread David Roe
http://trac.sagemath.org/sage_trac/ticket/14155. I'm going to try to write something. David On Wed, Feb 20, 2013 at 3:29 PM, kcrisman wrote: > Huh, how did I miss that... William says: > > I think the optimal answer for gcd(Mod(5,6), 5) would be Mod(1,6), and > the optimal answer for gcd(Mod(

Re: [sage-devel] gcd regression (?)

2013-02-20 Thread David Roe
Ready for review. David On Wed, Feb 20, 2013 at 4:16 PM, David Roe wrote: > http://trac.sagemath.org/sage_trac/ticket/14155. I'm going to try to > write something. > David > > > On Wed, Feb 20, 2013 at 3:29 PM, kcrisman wrote: > >> Huh, how did I miss that...

Re: [sage-devel] Re: gcd regression (?)

2013-02-21 Thread David Roe
Actually, the first three lines of integer's gcd are if not isinstance(n, Integer) and not isinstance(n, int): left, right = canonical_coercion(self, n) return left.gcd(right) so ZZ(12).gcd(mod(8,32)) will work the way you want it to. David On Thu, Feb 21, 2013 at 2:06 AM, John Cremona

Re: [sage-devel] Re: gcd regression (?)

2013-02-23 Thread David Roe
> David, very quick work. Looks like it's appropriate, and I love the > examples for different size integers, but I don't know enough about how > coercion works to review it, my apologies :( > No problem. For others who might feel comfortable with coercion, the ticket is ready for review. This

Re: [sage-devel] Errors in doctest on OS X 10.8.2

2013-03-06 Thread David Roe
One approach to figuring out what's going on would be to apply #12415 and see if the problem goes away. David On Wed, Mar 6, 2013 at 6:21 AM, Ben Salisbury wrote: > When I doctest a particular Sage enhancement, I receive errors that I do > not know how to handle. > > For example, consider the f

Re: [sage-devel] How to deprecate a class?

2013-03-14 Thread David Roe
I can't imagine that anyone is using FastHashable_class, except for > CategorySingleton. Nevertheless, Travis insists that we should keep > FastHashable_class available in sage.categories.category_singleton, with > a deprecation warning. > > But how? Is there a standard way to deprecate an import l

Re: [sage-devel] Re: Equality of expressions (inside a matrix)

2013-03-14 Thread David Roe
>> > >> That is not good. Worth a ticket? > > > > I don't think so. I guess there is a good reason not to simplify > > symbolic expressions by default. > > I disagree; I'd create one even if nobody wants to fix it at the moment. > The problem here isn't about simplification -- equal expressions bec

Re: [sage-devel] Slow eigenvalues

2013-03-15 Thread David Roe
H = H3.change_ring(ZZ) should work. It's not surprising that eigenvalues are so slow over the symbolic ring, though obviously it could be improved in the case that the entries are actually numbers of some kind. David On Fri, Mar 15, 2013 at 1:34 AM, Jan Groenewald wrote: > Hi > > A computation

Re: [sage-devel] Re: A problem with exceptions in cached functions

2013-03-19 Thread David Roe
I think it should be fairly rare that you want to explicitly opt out of caching (so I don't see the problem with calling Thing.my_function.f()). I echo Robert's -1. David On Tue, Mar 19, 2013 at 3:29 PM, Nathann Cohen wrote: > Helloo !! > > > > -1, that completely defeats the purpos

[sage-devel] Congratulations to IPython

2013-03-23 Thread David Roe
IPython has won the 2012 Free Software foundation award for the Advancement of Free Software ( http://www.fsf.org/news/2012-free-software-award-winners-announced-2). Well deserved! David -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscri

Re: [sage-devel] Some enhancements related to padics

2013-03-24 Thread David Roe
ful function on polynomials over > > p-adic rings and fields (like Hensel lift, slope factorization) > > > > . an implementation of bounded convergent series over ultrametic > > balls (this includes in particular power series over rings like > >

[sage-devel] Patchbots and sage-5.9

2013-03-26 Thread David Roe
Hi everyone, If you're running a patchbot, when you upgrade to sage-5.9-beta0 you should also upgrade to the most recent version of the patchbot at https://github.com/robertwb/sage-patchbot. David -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To

Re: [sage-devel] Re: slow arithmetic in number fields

2013-03-26 Thread David Roe
> Maybe I am just stupid, but I think that it would be good for this > behaviour to be documented more clearly! After all, if I define > R=RealField(200) and mutiply elements of R together the results will > still only have 200 bits of precision. (And yes, I do know the > difference between archi

Re: [sage-devel] Re: Idea (possibly silly) for interact syntax

2013-03-26 Thread David Roe
On Tue, Mar 26, 2013 at 10:35 AM, kcrisman wrote: > def _(x,y=2,1): This is not valid Python David -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-dev

Re: [sage-devel] Re: Annoying inconsistency of type in doctests

2013-03-28 Thread David Roe
I believe that this is a change due to updating IPython: you get different results for type depending on whether you're in an IPython shell or a Python script. I don't know how to fix it though. David On Thu, Mar 28, 2013 at 1:36 AM, Simon King wrote: > Hi Julien, > > On 2013-03-28, Julien Puy

Re: [sage-devel] Signal handling

2013-03-29 Thread David Roe
You could just use call from the Python subprocess module, which is documented in the Python docs. It depends on exactly what functionality you need from Sage. David On Fri, Mar 29, 2013 at 12:58 AM, tom d wrote: > Ok, the patch maybe works. Sage starts normally after patching, but I'm > gett

Re: [sage-devel] Re: Is it ok to include multiprocessing functions in a patch?

2013-03-30 Thread David Roe
I think it's okay: the new doctesting code uses multiprocessing. David On Sat, Mar 30, 2013 at 10:22 AM, mmarco wrote: > > > Solve the problem with @parallel in the first place? ;-) > > That is where the problem apperaed (see #14154). It doesn't appear > using @parallel('multiprocessing'), whic

Re: [sage-devel] When a module is removed, the .pyc file still exists after sage -b

2013-04-08 Thread David Roe
You can also delete the relevant files in $SAGE_ROOT/devel/sage/build (search through all three subfolders). David On Mon, Apr 8, 2013 at 4:48 AM, Nathann Cohen wrote: > Hello everybody !! > > I am having a small problem with patch 14355 which supposedly removes > a module that was "neve

Re: [sage-devel] deinstallation of spkg

2013-04-08 Thread David Roe
There are various people working on making this possible, but it requires a lot of changes to Sage's packaging system. As Jeroen says, this is not currently possible. David On Mon, Apr 8, 2013 at 2:25 AM, Jeroen Demeyer wrote: > On 04/08/2013 10:17 AM, Ralf Hemmecke wrote: > >> Is there a way t

Re: [sage-devel] Re: matrix multiplication weird coercion

2013-04-09 Thread David Roe
I think this issue is addressed at #8335, which I haven't had time to review David On Tue, Apr 9, 2013 at 3:52 PM, Travis Scrimshaw wrote: > Hey, >I'm pretty sure that's a bug since there is no coercion map between QQ > and GF(7) ( which is different than calling GF(7)(1/5) ). Here's so

Re: [sage-devel] DevMap Update

2013-04-11 Thread David Roe
It's probably worth updating mine since it's very out of date http://people.ucalgary.ca/~roed"; trac="roed" /> On Thu, Apr 11, 2013 at 3:42 AM, Harald Schilly wrote: > Hello (new) Sage Developers! > > There is a Map of all Sage developers on Sage's hompepage: > http://www.sagemath.org/develop

Re: [sage-devel] Re: GSoC project: make the Sage build system more distribution friendly

2013-04-12 Thread David Roe
First a disclaimer: I was at Sage Days 47 (working on the transition to git), but I'm not a git expert and I don't know the technical justification for some of the choices made (I think the best people to speak up in that direction would be Andrew Ohana, Keshav Kini, Robert Bradshaw, Timo Kluck or

Re: [sage-devel] # tol disables the meaning of ellipsis in doctesting

2013-04-14 Thread David Roe
I would say this is a bug. It's due to the fact that the actual output matched by the ellipsis contains a float, and thus the number of expected floats is different from the number actually found. See sage.doctest.parsing.SageOutputChecker.check_output (line 670). I think just deleting lines 670

Re: [sage-devel] Re: # tol disables the meaning of ellipsis in doctesting

2013-04-15 Thread David Roe
I'm not surprised that that file is different in my copy of Sage. The lines I'm referring to are: if len(want_values) != len(got_values): return False David On Mon, Apr 15, 2013 at 2:49 AM, cschwan wrote: > Are you sure about lines 670 and 671? These point to docstrings in my > case. Anywa

Re: [sage-devel] Re: Pickling and TestSuite problems in doctests

2013-04-22 Thread David Roe
Are these files in the Sage library? If not, the doctesting code executes the file, thus overwriting the factory. But it should be done before calling anything, so I wouldn't think it would cause this problem. As Volker says, can you post a testcase somewhere? David On Mon, Apr 22, 2013 at 9:3

Re: [sage-devel] Re: Rebuilding GCC

2013-04-30 Thread David Roe
On Tue, Apr 30, 2013 at 11:29 AM, leif wrote: > Jeroen Demeyer wrote: > >> On 04/30/2013 05:41 PM, Nils Bruin wrote: >> >>> If I were to get into a situation that sage wants to build GCC as >>> well, I'd hope a similar solution can be found. Are OSX people happy >>> to just build GCC from scratch

Re: [sage-devel] _test_enough_doctests() miss count?

2013-05-06 Thread David Roe
You can run sage: from sage.doctest.sources import FileDocTestSource sage: filename = "sage/schemes/projective/projective_point.py" sage: FDS = FileDocTestSource(filename, True, True, True, False) sage: FDS._test_enough_doctests(verbose=True) which will tell you the lines that it believes are bei

[sage-devel] Coefficients of power series

2013-05-07 Thread David Roe
I find the following behavior to be quite confusing (and it just cost me an hour tracking down). For consistency with multivariate polynomials, the coefficient method on univariate polynomials (and power series) only returns the nonzero coefficients. So: sage: R. = ZZ[] sage: (x^2+1).coefficient

Re: [sage-devel] Coefficients of power series

2013-05-07 Thread David Roe
This is now http://trac.sagemath.org/sage_trac/ticket/14548 David On Tue, May 7, 2013 at 3:58 PM, John H Palmieri wrote: > > > On Tuesday, May 7, 2013 2:45:16 PM UTC-7, William wrote: > >> On Tue, May 7, 2013 at 2:10 PM, David Roe wrote: >> > I find the following beh

Re: [sage-devel] Finite field nth_root too slow / stuck

2013-05-08 Thread David Roe
This is due to a changed algorithm in #7931 which was aimed at large n. In your case just factoring x^3-3 modulo p is doable, while the algorithm Sage is using requires a primitive root modulo p. This is now http://trac.sagemath.org/sage_trac/ticket/14551. Thanks for catching it! David On Tue,

Re: [sage-devel] Which docstrings should be doctested

2013-05-08 Thread David Roe
> Is there a compelling reason for why the new doctesting insists on > taking indentation into account? And in general in not taking each and > every multiline string in the file as a docstring where to get > doctests from? > The reason is to be able to identify what function is being tested: when

Re: [sage-devel] Backspace Key in Notebook

2013-05-10 Thread David Roe
Do you mean typing backspace when the cursor is at the beginning of the cell? That's the expected behavior David On Fri, May 10, 2013 at 3:10 AM, wrote: > Backspace in the Notebook in webkit(gtk) often (not always, haven't > found a pattern) joins the cell with the previous cell. As you mi

Re: [sage-devel] coercion ZZ, QQ and quadratic number field

2013-05-10 Thread David Roe
You can do: sage: K.=QuadraticField(2) sage: K.register_coercion(K.coerce_map_from(QQ) * QQ.coerce_map_from(ZZ)) For even more speed you can write your own custom Cython coercion from ZZ to K. David On Fri, May 10, 2013 at 12:59 PM, vdelecroix <20100.delecr...@gmail.com>wrote: > Hi, > > Let K

Re: [sage-devel] Functions returning

2013-05-12 Thread David Roe
One possibility would be to wrap the call to .n() in a try-except block. David On Sun, May 12, 2013 at 7:03 AM, wrote: > I think there is a conceptual problem with function returning s. > > Consider the following: > > def find_roots( func,l,r ): > tol = 1e-10 > try: > result = f

Re: [sage-devel] inheriting from a matrix class, adding attributes

2013-06-05 Thread David Roe
Are you calling some_matrix_thingy.__init__ inside your __init__ method? David On Tue, Jun 4, 2013 at 8:10 PM, Rob wrote: > I am trying to make a class PoolingMatrix, which needs to be an > (binary) integer matrix with extra attributes and functions. For > example, I'd like to say: > > sage: m

Re: [sage-devel] inheriting from a matrix class, adding attributes

2013-06-05 Thread David Roe
>> example, not saying Matrix_integer_dense is right). I do know that I want >> dense integer matrices of whatever shape the the 2D_list_arg determines. >> >> I'd like to know what to put in for parent_class in both places above, >> and whether the same thing goe

Re: [sage-devel] inheriting from a matrix class, adding attributes

2013-06-06 Thread David Roe
ols = len(data[0]) >> parent_arg = parent(matrix(ZZ, data)) >> return Pool(parent_arg, flatten(data), False, False) >> >> class Pool(sage.matrix.matrix_**integer_dense.Matrix_integer_**dense): >> def __init__(self, parent, entries, coerce, copy): >>

Re: [sage-devel] parallel for loop with minimal forking

2013-07-05 Thread David Roe
I collected this functionality in a decorator @unordered_parallel that lets > you replace > > for i in iterator: > yield f(i) > > by > > @unordered_parallel(iterator, number_of_chunks) > def _(i): > return f(i) > for res in _: yield res > > (As a side note: I'm really happy with

Re: [sage-devel] Re: New doctest continuation ....:

2013-07-05 Thread David Roe
The trailing newline is optional actually, since the doctest framework adds a newline. For example, the following should work: sage: for p in prime_range(3,6): : print p 3 5 David On Sun, Jun 23, 2013 at 3:09 PM, leif wrote: > Stefan wrote: > >> Tiny remaining comment: when typing a

Re: [sage-devel] Re: Taking a python int modulo a rational

2013-07-10 Thread David Roe
Note the following: sage: int(5).__mod__(4) NotImplemented sage: int(5).__mod__(QQ(2)) NotImplemented If a special method returns NotImplemented, Python will try calling the special method on the second input (with the arguments in the same order). In this case, the __mod__ methods of Integer and

Re: [sage-devel] Inverse a matrix over a ring with a unit determinant

2013-07-10 Thread David Roe
I do not know how to inverse a matrix over a special ring. The ring is > SymmetricFunction(QQ).schur() . For information, this ring has no method > is_unit for its elements (perhaps required to invert a matrix with a unit > determinant...) and this ring has no fraction_field implemented. > I woul

Re: [sage-devel] Inverse a matrix over a ring with a unit determinant

2013-07-10 Thread David Roe
> I just add Sage-combinat-devel for the following issue : > > The first problem appearing when I try to invert is that a method : > change_variable_name rename the variable used in the charpoly : > > *** > def change_variable_name(self, var): >

Re: [sage-devel] Re: Products of permutations use nonstandard order of operation

2013-07-18 Thread David Roe
On Tue, Jul 16, 2013 at 2:07 PM, Simon King wrote: > Hi David, > > On 2013-07-16, David Kohel wrote: > > Defining the (left or right) action by * would probably be a > > nightmare with the coercion model, since it is handled as > > a symmetric operator. > > Is this really so? > > There is stuff

Re: [sage-devel] Re: Changing branch on a trac ticket

2013-11-04 Thread David Roe
I agree with Volker: any plan which involves rewriting the history of your branch to make it "nicer" is a very bad idea. Once you push changes to trac, you really should not go back and rewrite your commits. Even if you decide you don't want some code that you introduced, you should introduce a n

Re: [sage-devel] Re: Broken ticket update on trac?

2014-01-06 Thread David Roe
We are all at Sage Days 56; he should check in on this in the morning. David On Mon, Jan 6, 2014 at 12:45 AM, Jean-Pierre Flori wrote: > > > On Monday, January 6, 2014 10:58:01 AM UTC+1, Volker Braun wrote: >> >> Andrew assured me that he had fixed that bug about 5 hours ago... maybe >> you can

Re: [sage-devel] Re: MonoDict Error when building documentation

2014-01-07 Thread David Roe
I'm not sure, but I have seen it as well. For me it was fixed by make doc-clean make Try starting with a fresh 6.0, make, pull in all changes from the development branch, make again? David On Tue, Jan 7, 2014 at 12:30 PM, Robert Bradshaw wrote: > On Tue, Jan 7, 2014 at 10:17 AM, Jeroen Demeye

Re: [sage-devel] Re: Conversions without mathematical sense between polynomial rings

2014-01-07 Thread David Roe
On Wed, Jan 1, 2014 at 2:17 PM, Peter Bruin wrote: > Hi Simon, > > >> I'd say this is (close to) a bug. >> > > It is a bug, without qualification. > Yes, it is a bug. So, we should think of being more precise, introduce "Set of partial maps >> from >> R to S", and use it as parents of partial m

Re: [sage-devel] Re: Conversions without mathematical sense between polynomial rings

2014-01-08 Thread David Roe
its valid domain). David On Tue, Jan 7, 2014 at 10:22 PM, Simon King wrote: > Hi David, > > On 2014-01-08, David Roe wrote: > > We have this already: sage.categories.sets_with_partial_maps. > > We have the "category of sets with partial maps", but we don't h

Re: [sage-devel] Re: Git reviewing help needed

2014-01-09 Thread David Roe
On a git ticket, click on the name of the branch (which should be green if it applies cleanly) and you'll get a diff of the changes that would occur if the ticket were merged into the current development branch. This view won't be affected by the kind of rebases that you mention. I will be in Bal

[sage-devel] Re: [sage-nt] Re: Sage speed (=slow) on number field arithmetic

2014-01-09 Thread David Roe
On Thu, Jan 9, 2014 at 6:25 AM, John Cremona wrote: > OK, so I should have asked this student (not one of mine!) for an > example before emailing the lists. In his (toy) example he had a 6x6 > integer matrix M and did > > e = max(M.eigenvalues()) > N = M-e > v = N.right_kernel().basis()[0] > > e

Re: [sage-devel] Creating a new branch

2014-01-13 Thread David Roe
On Mon, Jan 13, 2014 at 5:10 AM, John Cremona wrote: > The following surprised me. I wanted to work on ticket #10108 which > had an old patch (which no longer applies). Here is what I did: > > 1. I made sure that I was on the develop branch which was up-to-date. > 2. I did > sage -dev checkout

Re: [sage-devel] sage --dev: changing dependencies

2014-01-15 Thread David Roe
I think sage: dev._sagedev._set_dependencies_for_ticket(15123, None) should work. David On Wed, Jan 15, 2014 at 5:39 AM, Jeroen Demeyer wrote: > My local Sage installation wrongly thinks that #15123 depends on #14804, > so every time I do ./sage -dev push it adds the dependency on Trac. Is > the

Re: [sage-devel] Pkgconfig as standard spkg

2014-01-27 Thread David Roe
I vote [*] Yes. I think it's okay to add it now since there's active work on using it for other packages. David On Mon, Jan 27, 2014 at 6:33 AM, Jeroen Demeyer wrote: > On 2014-01-27 12:40, Volker Braun wrote: > >> This is the obligatory "new spkg" vote... >> > I vote for > > [*] Yes, make the

Re: [sage-devel] bug in doctesting framework

2014-01-28 Thread David Roe
See trac.sagemath.org/ticket/15749 David On Sun, Jan 19, 2014 at 6:38 AM, P Purkayastha wrote: > From what I remember, doctesting a file using > sage -btnew > > used to work from all directories. It doesn't right now because it doesn't > take the relative path or absolute path into account. The

[sage-devel] Problem building Sage after upgrading OS X 10.6.8 -> 10.9.1

2014-02-05 Thread David Roe
I recently upgraded OS X and now run into trouble building Sage. XCode displays the version number as Version 5.0.2 (5A3005). When I try "make build" in my existing Sage (built before the upgrade), I get the following error: checking for C compiler default output file name... configure: error: C

Re: [sage-devel] Re: Problem building Sage after upgrading OS X 10.6.8 -> 10.9.1

2014-02-05 Thread David Roe
On Wed, Feb 5, 2014 at 7:32 PM, John H Palmieri wrote: > On Wednesday, February 5, 2014 4:33:58 PM UTC-8, David Roe wrote: >> >> I recently upgraded OS X and now run into trouble building Sage. XCode >> displays the version number as Version 5.0.2 (5A3005).

Re: [sage-devel] Re: trouble building sage with semigroup package installed

2014-02-06 Thread David Roe
I had the same problem, which was solved by running xcode-select --install as Volker (and John Palmieri) suggested. David On Thu, Feb 6, 2014 at 9:09 AM, Volker Braun wrote: > Do you have the xcode command line tools installed? Also, look into > config.log as explained in the error message for

Re: [sage-devel] Coercion problem ?

2014-02-12 Thread David Roe
> sage: W([1,2]) in ZZ > --- > NotImplementedError Traceback (most recent call last) > in () > > 1 W([Integer(1),Integer(2)]) in ZZ > [...] > > NotImplementedError: please implement _an_element_ for W

Re: [sage-devel] Re: Saving .show() Output as a Vector Graphic

2014-02-26 Thread David Roe
See http://stackoverflow.com/questions/6990099/explaining-the-python-self-variable-to-a-beginner David On Wed, Feb 26, 2014 at 12:48 PM, Dominique Laurain < dominique.laurai...@orange.fr> wrote: > I read, and read again and read again..and don't understand why 1rst > parameter "self" is missing

Re: [sage-devel] Nasty NTL bug

2014-03-12 Thread David Roe
That ticket is currently marked as "needs work." Should it be "needs review?" David On Wed, Mar 12, 2014 at 3:31 AM, Jean-Pierre Flori wrote: > Anyone wants to review a fix for a long standing nasty bug? > http://trac.sagemath.org/ticket/9524 > > The current solution is maybe not optimal, but a

Re: [sage-devel] Re: RFC: draft PEP for adding @ as a matrix multiplication operator to Python

2014-03-14 Thread David Roe
On Fri, Mar 14, 2014 at 2:32 PM, Nils Bruin wrote: > On Sunday, March 9, 2014 8:09:58 AM UTC-7, n...@vorpus.org wrote: >> >> Greetings, Sage Ones, >> >> Some of you may have already seen this, but I've started working on a >> draft PEP for adding a dedicated operator for matrix multiplication to

Re: [sage-devel] Error when using fast_callable with PowerSeriesRing element

2014-03-17 Thread David Roe
The fact that Integer(T(1)) doesn't work is definitely a bug. A brief glance at sage.ext.fast_callable (in particular, the code in Expression.__pow__) suggests that fixing the first problem might yield an expression that doesn't use an exponent in the coefficient ring. However, I'm not as familia

Re: [sage-devel] Should RR coerce into RIF?

2014-03-18 Thread David Roe
Marc Mezzarobba wrote: >Marco Streng wrote: >> So the choices are: >> >> 1) explicit conversion RR --> RIF: allow / disallow >> 2) explicit conversion RIF --> RR: allow / disallow >> 3) automatic coercisions: disallow / (RR-->RIF) / (RIF-->RR) >[...] >> My vote is: >> 1) allow >> 2) allow >> 3) fro

Re: [sage-devel] A "# bug" tag for doctests

2014-03-25 Thread David Roe
On Tue, Mar 25, 2014 at 2:05 PM, Nathann Cohen wrote: > > No, it would have the consequence that there would never be any Sage > release anymore. > > Still, can we find some middle ground that would make it impossible > for known bugs to never be fixed ? > While there may be things we can do to b

<    1   2   3   4   5   6   7   8   9   10   >