[sage-devel] Re: Coercion trouble

2007-11-15 Thread David Roe
The code for residue field is currently not correct. In converting a number field element, it expresses it in terms of a power basis for the number field and then casts the coefficients to Z/pZ. But the coefficients can have denominators divisible by p in general. That's probably what's causing

[sage-devel] Re: Coercion trouble

2007-11-15 Thread David Roe
I lost internet connection and then lost the traceback when my machine restarted, so if you could open a ticket on the __rpath issue, I would apprectiate it. The residue field problem is ticket 1183. David On Nov 15, 2007 9:29 PM, David Roe <[EMAIL PROTECTED]> wrote: > I lost

[sage-devel] Power series rings

2007-11-16 Thread David Roe
Hey all, At some point in the near future I may try to bring the implementation of power series rings more into line with the p-adics. The single variable case seems straightforward, but a something popped up for me when thinking about the multivariable case. What is the appropriate analogue of l

[sage-devel] Re: writing a new class

2007-11-20 Thread David Roe
This is one of the things I'd been planning on adding to the new programming guide. Your issue is that you're creating a new directory. When you do that, you have to add that directory to the list of packages at the bottom of setup.pyin sage-root/devel/sage-branch/ You should also put an __init__

[sage-devel] Re: ArithmeticError

2007-11-21 Thread David Roe
It's fixed (patch posted to trac). As suspected, it was a bug introduced in the ell_rational_field refactoring. David On Nov 21, 2007 12:25 PM, William Stein <[EMAIL PROTECTED]> wrote: > > On Nov 20, 2007 1:40 PM, Paul Zimmermann <[EMAIL PROTECTED]> wrote: > >William, > > > > sage told

[sage-devel] Re: Talk about SAGE at Les Trophees du Libre 2007 competition

2007-11-25 Thread David Roe
I have to agree. The slide where you list p-adic numbers, p-adic L-functions and p-adic height pairings kinda jumped out at me. While I'm obviously interested in that kind of stuff, it won't appeal as much to a non-specialist audience. One might argue that as things implemented natively in Sage,

[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-25 Thread David Roe
Addition not commuting there bothers me. I can see why it's happening: a SymPy object doesn't call into the coercion system. One possible solution is to have coercion map sage objects into sympy, so both s+o and o+s (in line 134 and 135 of test_sympy.py) would be SymPy objects. Is SymPy and the

[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-25 Thread David Roe
> I don't think so, since probably sage/maxima have special functions > sympy doesn't. And even if it could be, the functions provided by > SymPy are different > than the ones provided by SymbolicRing. > > If sympy('x') + x and x + sympy('x') are totally different in Sage I > will be unhappy about

[sage-devel] Re: Sage equivalents for Maple number theory functions

2007-11-30 Thread David Roe
Excellent list! Maybe I should take a break from p-adics and do some of these. Some of the gaps should be quite easy to fill in. David On Nov 30, 2007 12:45 PM, Stephen Forrest <[EMAIL PROTECTED]> wrote: > > Hello all, > > I've lurked on this list for a time, commenting little because I am > no

[sage-devel] Sparse SVD

2007-12-14 Thread David Roe
My housemates have been writing a Python wrapper for SVDLIBC (a C library that does SVDs for sparse and dense matrices over the reals) using Swig. I suggested that they use Cython instead and thought that this might make a good spkg. I've asked a few people about sparse SVDs, and I think Sage cur

[sage-devel] Re: factor ideals at NF

2007-12-29 Thread David Roe
The issue is that since Sage uses pari to do everything in the background, one needs to create the pari data structures, which means that you currently call nfinit on the number field, which computes the class group and unit group. This should change eventually, but right now... David On Dec 29,

[sage-devel] Re: anyone with osx 10.4 intel please test this for dvd

2008-01-06 Thread David Roe
It worked for me. David On Jan 6, 2008 1:08 AM, Joshua Kantor <[EMAIL PROTECTED]> wrote: > > Hello. for the dvd we are including a dmg file. There was some > problems with the initial version of this. I believe the following is > working, > but if anyone else could test that following the instruc

[sage-devel] [sage-deve] anyone with osx 10.4 intel please test this for dvd

2008-01-06 Thread David Roe
> > David, can you test the md5sum of the downloaded .dmg file. > > At the terminal > > md5 > > FWIW, I get: > > MD5 (/SandBox/DownLoads/sage-2.9.2-osx10.4-intel-i386-Darwin.dmg) = > 7bdaf64293d8136aa0d59c89b894ca79 > I get the same: MD5 (sage-2.9.2-osx10.4-intel-i386-Darwin.dmg) = 7bdaf64293d81

[sage-devel] Re: loading integer or float data from file into a matrix

2008-01-10 Thread David Roe
One way to do it is to use the Python functions on strings. For example, if you want to use the real double field (RDF) and matrix_data is your string, the following should do what you want: M = matrix(RDF, [b.split() for b in matrix_data.split('\n')]) The split method of a string creates a list

[sage-devel] Re: hodge number calculator

2008-01-14 Thread David Roe
That looks quite cool. spkg's are generally for non-Python files. The way to put a Python file into sage is to convert your .sage file to a .py file (for example, changing "^" to "**" throughout) and then putting it somewhere with the sage library files (for example, in $SAGE_ROOT/devel/sage-main

[sage-devel] Re: Doc Day 1 announcement: January 17th, 2008, 9am-5pm PST

2008-01-16 Thread David Roe
Note that I just put up a ticket with patch (1795) that fixes sage-coverage so that it checks cdef'd and cpdef'd functions and classes. David On Jan 16, 2008 12:00 PM, Martin Albrecht <[EMAIL PROTECTED]> wrote: > > On Wednesday 16 January 2008, mabshoff wrote: > > Hello folks, > > > > after doing

[sage-devel] Re: Doc Day 1 announcement: January 17th, 2008, 9am-5pm PST

2008-01-16 Thread David Roe
My modification to sage-coverage checks to see that doctests are present in the docstring of a cdef'd function but doesn't check that the function name is there (because it usually won't be). David On Jan 16, 2008 2:24 PM, Nick Alexander <[EMAIL PROTECTED]> wrote: > > > On 16-Jan-08, at 11:17 AM,

[sage-devel] Re: Doc Day 1 announcement: January 17th, 2008, 9am-5pm PST

2008-01-16 Thread David Roe
> Of course, it'd be nice if every function had ample documentation, > but I'd rather have 100% coverage on all user-accessible functions in > two files, than 100% coverage in one file for def/cpdef and cdef > functions. Also, often the "inderect" tests for cdef functions seem > to be redundant wit

[sage-devel] Re: Doc Day 1 announcement: January 17th, 2008, 9am-5pm PST

2008-01-16 Thread David Roe
With the modifications, our overall coverage is at 33.1%. David On Jan 16, 2008 2:56 PM, mabshoff < [EMAIL PROTECTED]> wrote: > > > > On Jan 16, 8:51 pm, "David Roe" <[EMAIL PROTECTED]> wrote: > > > Of course, it'd be nice if every function had am

[sage-devel] Re: infinity

2008-01-17 Thread David Roe
y, but then I'm the one that originally made the design decision, so David On Jan 17, 2008 9:52 AM, David Harvey <[EMAIL PROTECTED]> wrote: > > Hi folks (especially william + robert + david roe), > > I showed up for Doc Days 1 and started looking at the infi

[sage-devel] Re: infinity

2008-01-24 Thread David Roe
So perhaps the solution to your problem is the extended integers (or extended rationals). This needs some work (both in terms of speed and with having multiple types for elements of the same parent), but it does have the benefit of returning 1 as the answer to 1 + 0/infinity. Perhaps the default

[sage-devel] Re: differential forms

2008-02-01 Thread David Roe
What kinds of geometric objects do your forms live on? Algebraic curves and varieties? Manifolds? Manifolds with boundary? David On Feb 1, 2008 8:00 AM, Peter Storm <[EMAIL PROTECTED]> wrote: > > Hello, > > I would like to either develop or find a method for computing with > differential forms

[sage-devel] Re: Add new structures to Sage: Parent and Element

2008-02-12 Thread David Roe
So, these kinds of issues were the subject of the coercion project at SD7. Robert Bradshaw, Mike Hansen, Bobby Moretti and I are currently in the process of changing a lot of the infrastructure behind parents, elements, etc. If you want to help (or want to see our current progress) see the sprint

[sage-devel] Re: Sage 2.10.2.alpha0 released!

2008-02-15 Thread David Roe
This is doctest where the result used to be Traceback (most recent call last): ... TypeError: cannot create a p-adic out of but after the p-adics patch it started working and returning p. I looked at it briefly and couldn't figure out why it was doing so. David On Fri, Feb 15, 2008 at 3:16 PM

[sage-devel] Re: Sage 2.10.2.rc0 release!

2008-02-22 Thread David Roe
> Here are the pow_computer failures: > sage -t devel/sage-main/sage/rings/padics/pow_computer.pyx > ** > File "pow_computer.pyx", line 160: >sage: PC._pow_mpz_t_tmp_demo(6, 8) > Expected: >244140625 > Got: >1525878906

[sage-devel] Re: exact cover problem

2008-02-22 Thread David Roe
In this context I think that binary means all the entries are 1s and zeros. But when you look for a set of rows that add up to [1,1,1,...], you don't consider 1+1=0. This makes sense when you want only one 1 to appear in each column, which is a natural requirement, and makes the problem much harde

[sage-devel] Re: some more entries for sagemath.org/pub.html

2008-02-23 Thread David Roe
A friend of mine also pointed out the following, which uses Sage to compare runtimes for different algorithms: Dan Boneh, Craig Gentry, Michael Hamburg. http://crypto.stanford.edu/~dabo/pubs.html";>Space-efficient identity based encryption without pairings (37 pages), Proceedings FOCS 2007. David

[sage-devel] Re: set_si & set_str in Integer

2008-03-03 Thread David Roe
I think they should still exist, but should be cdef'd. This means I can interface between C longs and sage Integers without having to reach in and grab n.value, but one can't use them to make Integers mutable in Python. A function get_si() would also be useful if it did bounds checking so that I

[sage-devel] Re: set_si & set_str in Integer

2008-03-03 Thread David Roe
t you don't have to rewrite the overflow checking each time: I've done that over and over). David On Mon, Mar 3, 2008 at 10:34 AM, Carl Witty <[EMAIL PROTECTED]> wrote: > > On Mar 3, 5:42 am, "David Roe" <[EMAIL PROTECTED]> wrote: > > I think they should

[sage-devel] Re: set_si & set_str in Integer

2008-03-03 Thread David Roe
ROTECTED]> wrote: > > On Monday 03 March 2008 08:42:53 am David Roe wrote: > > I think they should still exist, but should be cdef'd. This means I can > > interface between C longs and sage Integers without having to reach in > and > > grab n.value, but one can't u

[sage-devel] Re: repr or input_form or some way of getting the code to create an object

2008-03-05 Thread David Roe
I agree with the choice of _sage_init_. By default this can return self._repr_(), but should be overridden in cases like matrix. David On Wed, Mar 5, 2008 at 1:32 AM, Robert Bradshaw < [EMAIL PROTECTED]> wrote: > > _sage_init_ sounds like the right solution. The problem is that for > many object

[sage-devel] Re: linear algebra in Cython

2008-03-08 Thread David Roe
There are tons of examples of things in the sage library: just look for .pyx files. In particular, many of the matrix files are written in cython: look in sage.matrix. For loops, use the syntax: cdef Py_ssize_t i cdef long n = 17 for i from 0 <= i < n: do_stuff() Hope this helps. David On F

[sage-devel] Re: Bring back the XOR

2008-03-10 Thread David Roe
Note that the function that is called by "^" is __xor__. So you can already do a.__xor__(b). If you want to write the function that David describes, calling a.__xor__(b) is better than using eval. David On Mon, Mar 10, 2008 at 6:34 AM, David Joyner <[EMAIL PROTECTED]> wrote: > > Another solutio

[sage-devel] Re: Multivariable LaurentSeries Ring?

2008-03-27 Thread David Roe
It's in progress. See http://trac.sagemath.org/sage_trac/ticket/2291 David On Thu, Mar 27, 2008 at 9:28 AM, bump <[EMAIL PROTECTED]> wrote: > > On Feb 19, 1:27 pm, "David Roe" <[EMAIL PROTECTED]> wrote: > > > This should be pretty easy (though multiv

[sage-devel] Re: Summing up a list only *linear*?

2008-03-31 Thread David Roe
Splitting it like this still yields a linear algorithm. If f(n) is the time to add a list of length n, then you have f(n) = 2*f(n/2), so f(n) is linear. David On Mon, Mar 31, 2008 at 1:04 AM, Simon King <[EMAIL PROTECTED]> wrote: > > Dear Sage team, > > i made a few timings with the "sum" func

[sage-devel] Re: Output Form versus Internal Structure

2008-04-01 Thread David Roe
Separate from the coercion model, I have some ideas for changing where printing code lives (see the section on printers at the bottom of http://www.sagemath.org:9001/days7/coercion). I agree that it should be easy to implement output into other formats, and I'll keep that in mind when I actually

[sage-devel] Re: Output Form versus Internal Structure

2008-04-01 Thread David Roe
We are considering a more advanced model > > (David Roe has lots of ideas on this front), but this falls outside > > of the central focus coercion scheme. (This is one reason to use > > _repr_ rather than the Python __repr__ so that the base object's > > __repr__ can do

[sage-devel] Re: p-adic crash error

2008-04-07 Thread David Roe
I'm back from my three week trip to the west coast and will take a look at this. David On Mon, Apr 7, 2008 at 11:16 AM, Kiran Kedlaya <[EMAIL PROTECTED]> wrote: > > Jen Balakrishnan spent time with some of the usual suspects during the > Arizona Winter School tracking down bugs in the p-adics,

[sage-devel] Re: trouble running n() on matrices

2008-04-08 Thread David Roe
If you take a look at the source code for n(), you'll see that the first thing that it does is to try calling numerical_approx(prec) on the object, and then tries coercing to real or complex fields. So the solution is to write a method numerical_approx(prec) in the matrix base class that tries to

[sage-devel] Re: p-adic crash error

2008-04-10 Thread David Roe
I think Willem fixed this bug. I've made the same change a few other places and added a doctest. David On Mon, Apr 7, 2008 at 11:16 AM, Kiran Kedlaya <[EMAIL PROTECTED]> wrote: > > Jen Balakrishnan spent time with some of the usual suspects during the > Arizona Winter School tracking down bugs

[sage-devel] Re: p-adic crash error

2008-04-10 Thread David Roe
No, I forgot to change it back. Use the patch I posted instead, which changes all the eis_shift_a's back to eis_shift. The p-adics folder passes sage -t now. David On Thu, Apr 10, 2008 at 8:53 PM, mabshoff <[EMAIL PROTECTED]> wrote: > > > > On Apr 11, 12:35 am, "

[sage-devel] Re: integers beginning with zero

2008-04-13 Thread David Roe
On the other hand, using a leading zero to indicate octal is a fairly standard convention in computer science. And it's nice to minimize these kinds of differences between Python ints and Sage Integers. David On Sun, Apr 13, 2008 at 3:36 PM, Harald Schilly <[EMAIL PROTECTED]> wrote: > > On Apr

[sage-devel] Re: Noncanonical coercion (finite fields)

2008-04-14 Thread David Roe
e sizes that Willem is > talking about: > > > ConwayPolynomial(3,100); >^ > Runtime error in 'ConwayPolynomial': A conway polynomial for GF(3^100) is not > known > > David Roe and I (and probably some other people) talked about this way >

[sage-devel] Re: Noncanonical coercion (finite fields)

2008-04-14 Thread David Roe
Grrr... I clicked reply, and then tried to click on the text field to begin typing, and it scrolled down at exactly the wrong moment and the right amount so that I clicked send insteady. Sorry about that. > David Roe and I (and probably some other people) talked about this way > back

[sage-devel] Re: sage -n?

2008-04-15 Thread David Roe
I would prefer sage -n, because -b suggests build to me, so sage -nb would be rebuild and then start the notebook. David On Tue, Apr 15, 2008 at 1:29 PM, didier deshommes <[EMAIL PROTECTED]> wrote: > > On Tue, Apr 15, 2008 at 1:11 PM, Kiran Kedlaya <[EMAIL PROTECTED]> wrote: > > > > Currently

[sage-devel] Re: possible package for inclusion in Sage

2008-04-20 Thread David Roe
+1 from me as well. There have been a few times recently when I've wished Sage included a component for solving linear programming or integer programming optimization problems. David On Sun, Apr 20, 2008 at 11:20 AM, Harald Schilly <[EMAIL PROTECTED]> wrote: > > On Apr 20, 4:42 pm, "William Ste

[sage-devel] Re: [fricas-devel] Re: Project

2008-04-20 Thread David Roe
On Sun, Apr 20, 2008 at 5:13 PM, TimDaly <[EMAIL PROTECTED]> wrote: > > > I'm surprised by how convinced you are that using a specific > > technology/language -- literate programming -- can be a silver > > bullet to solve such a difficult problem. I think peer review, > > and many many other

[sage-devel] Coercion

2008-04-22 Thread David Roe
Hey, If you want to log onto sage-devel, I'm working on coercion and had a few things to talk about. David --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For mor

[sage-devel] Re: Initial support for posets

2008-04-24 Thread David Roe
+1: Lattice as abelian group with inner product. -1: Lattice as poset with meet and join (of course I'm biased by number theory, though I admit that I have heard of the second kind of lattice. ;-) That being said, I'm glad people are working on the poset kind of lattice: I'd wanted to do so for

[sage-devel] Re: Initial support for posets

2008-04-24 Thread David Roe
One thing that Python has going for it here is that it's object oriented. So f.differentiate() is disambiguated because f has a type. The time when this doesn't help is object creation (thus the issue for Lattices). It's worth having this discussion, and I agree that names matter, but the probl

[sage-devel] Re: A Sage Enhancement Proposal: Lattice Modules

2008-04-28 Thread David Roe
ufficiently well in Sage, and perhaps he feels some > responsibility > related to this since he did the current AbelianGroup implementation in Sage. > > I disagree with David -- if AbelianGroup is the right thing to derive > form (I'm not saying it is!), > but AbelianGr

[sage-devel] Re: Sage 3.0.2 merge cycle opened

2008-05-05 Thread David Roe
I'm not going to be able to work much more on coercion until next week, and I don't get the impression that Robert has much time this week either. It's probably best to put coercion off until after 3.0.2. David On Mon, May 5, 2008 at 11:44 AM, mabshoff <[EMAIL PROTECTED]> wrote: > > Hello folks

[sage-devel] Re: infinity

2008-05-13 Thread David Roe
So, I think I was the one to rework infinity most recently. I don't really have time today to expand at length on the issues you brought up, but I agree with them to some extent. I will note that a coercion is "a natural map into the object," which is why your first example failed, but the __cal

[sage-devel] Re: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread David Roe
I agree with Nick here. If we want to change the default behavior of some functions so that they work the same as over the fraction field, that's fine. But don't add a call to fraction field to the constructor. ZZ is the initial object in the category of rings. That's a good reason for it to be

[sage-devel] Re: Adding functions to Sage

2008-05-27 Thread David Roe
Yeah, I arrive in Seattle on June 9. David On Tue, May 27, 2008 at 1:20 AM, Nick Alexander <[EMAIL PROTECTED]> wrote: > > > On 26-May-08, at 9:40 PM, David Roe wrote: >> >> I've gotten distracted by trying to do work that my advisor gave me. >> I suspec

[sage-devel] Re: Sage Days

2008-05-27 Thread David Roe
Algebraic topology. David On Tue, May 27, 2008 at 2:32 AM, mhampton <[EMAIL PROTECTED]> wrote: > > Dynamical systems - I think this now might be Sage's weakest area of > mathematics. Getting AUTO/pydstool and other more specialized code in > Sage is necessary if its going to have any appeal to t

[sage-devel] Re: Pickling functions

2008-06-14 Thread David Roe
One way to get around this limitation in python is to use callable classes instead of functions. David On Sat, Jun 14, 2008 at 10:42 AM, David Harvey <[EMAIL PROTECTED]> wrote: > > On Jun 14, 2008, at 1:25 PM, Daniel Bump wrote: > > > Some code that has been proposed by Nicolas Thiery > for sage/

[sage-devel] Re: sage.math

2008-06-19 Thread David Roe
sage.math seems to be back up. At least, I'm logged in to it. ;-) David On Thu, Jun 19, 2008 at 12:47 PM, William Stein <[EMAIL PROTECTED]> wrote: > > Hi, > > sage.math is down and I don't have physical access to the machine right now. > Reminder: a backup from yesterday of everybody's file is

[sage-devel] Re: presentation about Maxima at Sage developer days

2008-07-01 Thread David Roe
> BTW, I have also modified giac source, it should now compile with gcc > 4.3.1. Excellent! > As I said earlier, I'm ready to invest time for that, but I can't do > it alone, there must be someone on the python side who has time and > interest to do it with my help. I've seen a lot of acrimonio

[sage-devel] Re: Help fixing pari shared library across all platforms

2008-07-13 Thread David Roe
I'm running OS X 10.4 and the warning about DT_TEXTREL doesn't appear in my install log. Good luck! David On Sun, Jul 13, 2008 at 3:51 AM, François Bissey <[EMAIL PROTECTED]> wrote: > > Hi all, > > Recently David Kirkby tried to compile sage on > solaris express and it blew up on pari. Turns out

[sage-devel] Re: Lazy Infinite Power Series

2008-10-29 Thread David Roe
Great! This has been on my list of things I'd like to have implemented for a while. Presumably, much of this code will be incorporated into the Sage library. So it's not really a "package" per se. Instead, you should make a ticket on trac (http://trac.sagemath.org/sage_trac), for which you nee

[sage-devel] p-adics

2007-01-25 Thread David Roe
Hey all, Genya and I have code for p-adic ring and field classes and are currently debugging and writing documentation. If you're interested I've posted the four files at sage.math.washington.edu/home/roed/padics07 I've been running into some trouble figuring out how to change everything I need

[sage-devel] Re: p-adics

2007-01-25 Thread David Roe
They implement a somewhat modified version of the interfaces in the folder. The folder also includes other classes that we haven't written yet. David On Jan 25, 4:12 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On Thu, 25 Jan 2007 13:03:39 -0800, David Roe &

[sage-devel] Re: p-adics

2007-01-25 Thread David Roe
u, 25 Jan 2007 14:15:07 -0800, David Roe <[EMAIL PROTECTED]> wrote: > > > They implement a somewhat modified version of the interfaces in the > > folder. The folder also includes other classes that we haven't written > > yet.Did you start with the code in SAGE_ROOT/devel/

[sage-devel] Re: p-adics

2007-01-25 Thread David Roe
25, 5:59 pm, "David Roe" <[EMAIL PROTECTED]> wrote: > I didn't know that the code in SAGE_ROOT/devel/sage/sage/rings/padics > was actually working. I'll take a look at it and see if I can just > incorporate actual source into that framework. > David >

[sage-devel] Re: design question: interval arithmetic comparisons

2007-02-12 Thread David Roe
I'm actually working on a slightly different type of interval compare for the p-adics. Lazy p-adics will return an interval as their valuation if they're currently indistinguishable from 0: it will be of the form [a, infinity] or [a, a]. If you compare such intervals, they shrink themselves unti

[sage-devel] slices

2007-02-21 Thread David Roe
If one types a[4:8:2] in Python, Python creates a slice object (call it s) with s.start = 4, s.stop = 8 and s.step = 2. It then passes this slice object to a's __getitem__ method. If one of the arguments is left out, it is filled with None: so the slice [:8:2] would have start None. However, if

[sage-devel] Random elements

2007-03-02 Thread David Roe
I've been thinking about random elements a bit for p-adics. There are lots of good and reasonable ways to generate random elements of things. For example, in addition to Robert's suggestion, we could have a Gaussian distribution with a specified mean, or a Poisson distribution... It seems like a

[sage-devel] Re: First remarks on new padics model

2007-03-07 Thread David Roe
I tried sending a response a while ago, but it didn't seem to get through. I'm including a response to David Kohel's e-mail at the bottom of this. > Congratulations on the new p-adic model. This really looks very > promising and extensible. Thanks. > - It should be possible to create elements

[sage-devel] Re: First remarks on new padics model

2007-03-08 Thread David Roe
> My mistake, but the errors let me think it was sage's fault. I typed > pAdicRing(3,prec="lazy") > which gets accepted. Doing anything with the ring afterwards leads to > the > above error. You should probably validate all construction parameters > at construction time. Sounds like a good idea.

[sage-devel] Re: sage-2.4-rc3

2007-03-25 Thread David Roe
Build (for rc3) went fine on my machine (32 bit MacBook Pro, OS X 10.4.9) real61m23.087s user38m43.449s sys 15m50.664s Make test: All tests passed! Total time for all tests: 1732.5 seconds David On Mar 25, 5:52 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > Can you send the part of

[sage-devel] Re: integer-shiting + mpfr reals

2007-03-26 Thread David Roe
Two things. First, order of operations is not what I would expect: your first code is equivalent to sage: 1 << (3 + 1.2). Note that sage: (1 << 3) + 1.2 9.20 works. Secondly, the reason the second example works is that you can shift by an integer n, and it just multiplies by 2^n (bef

[sage-devel] Coercion in multivariable polynomial rings

2007-03-29 Thread David Roe
I sent this a little while ago but it didn't seem to go through... sorry if it appears twice. What do people think of having a canonical map between multivariate polynomial rings when one's variables are a subset of the other's? What about a subset in the same order? What about an initial subset

[sage-devel] Re: Coercion in multivariable polynomial rings

2007-03-29 Thread David Roe
AIL PROTECTED]> wrote: > On 3/29/07, David Roe <[EMAIL PROTECTED]> wrote: > > > I sent this a little while ago but it didn't seem to go through... > > sorry if it appears twice. > > > What do people think of having a canonical map between multivariate > &g

[sage-devel] Re: Coercion in multivariable polynomial rings

2007-03-29 Thread David Roe
I guess I'm not totally sure what you meant by (3). Do you mean (3) If (2) is satisfied, then for all v variables of R and w variables of S that are not in R, v < w? > Actually, whatever we do, we should make sure and require that > the term orders on the two rings are compatible. What is th

[sage-devel] File location for polynomials and matrices

2007-03-29 Thread David Roe
So, I'm planning on writing new classes for matrices and polynomials over p-adics. Eventually there will probably be 8 new classes for each of matrices and polynomials. Should these go in rings/padics? rings/padics/polynomial and rings/padics/matrix? In rings/ and matrix/? Move polynomial_eleme

[sage-devel] Re: File location for polynomials and matrices

2007-03-29 Thread David Roe
I can try writing the matrices using SageX... Then working with 1x1 matrices might be faster than working with padics... ;-) David On Mar 29, 11:59 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On 3/29/07, David Roe <[EMAIL PROTECTED]> wrote: > > > So, I

[sage-devel] Re: File location for polynomials and matrices

2007-03-29 Thread David Roe
which naive arithmetic leads > > to very serious precision issues, so one wants to overload the default > > algorithms with algorithms that behave more sensible. > > > > Also, it's entirely possible that David Roe has in mind, at least > > in some > > cases,

[sage-devel] Re: File location for polynomials and matrices

2007-03-30 Thread David Roe
So, I think I might want to use the __new__ function of Matrix_integer_dense directly, but I don't really know what I'm doing (thus contradicting the warning in the docstring for that function). So I thought I would check with the list. A p-adic matrix will include an integer matrix of values. S

[sage-devel] Help with SageX

2007-04-03 Thread David Roe
So, I'm trying to learn how to write Pyrex code. So far, I've been able to fit some functions into existing files, but creating new files and modules to Sage has been difficult... I'm moving polynomials to sage.rings.polynomial because there are getting to be a fair number of files for polynomial

[sage-devel] Random Reals

2007-04-03 Thread David Roe
Hey, I've been looking into changing RR.random_element and RDF.random_element to do something more sensible than create a random integer in the range -2 to 2 and coerce it into the reals. The reasonable thing to do for RDF seems to be to use GSL, create a RealDistribution and then return a random e

[sage-devel] Re: is_zero

2007-04-12 Thread David Roe
On 4/12/07, David Roe <[EMAIL PROTECTED]> wrote: > > I just took a look at the Python 3000 PEP. A couple of points where > things due to be phased out are commonly used in SAGE: > -- raise ValueError, "That number shouldn't be zero" -- now illegal > -- rai

[sage-devel] Re: A patch for rational and integers (Re: sage-2.4.2)

2007-04-13 Thread David Roe
I also have a patch for RDF.random_element. I've pasted it in below for comparison to ideas other people have. The interface is still incomplete (I wrote it in 5 minutes): I want to eventually provide an interface to all of the probability distributions that GSL offers. def random_element(se

[sage-devel] Coercion and categories in SAGE

2007-04-26 Thread David Roe
In the course of thinking about coercion for p-adic rings, fields and extensions, I've had some ideas about a different kind of coercion model to use for SAGE. It would fit into the existing coercion model, though I can see it motivating changes to the existing model. SAGE currently does quite we

[sage-devel] Re: Coercion and categories in SAGE

2007-04-26 Thread David Roe
manually cast an element of a RealCompletionField into RR. Similarly for ComplexCompletionField (I suppose I choose one of the conjugate embeddings arbitrarily) and pAdicCompletionField. David On 4/26/07, David Roe <[EMAIL PROTECTED]> wrote: > > In the course of thinking about coercion for

[sage-devel] Re: Coercion and categories in SAGE

2007-04-26 Thread David Roe
braic topology? I hear that Singular has a library for doing ext and tor, etc (I think it's called homolog_lib). David On 4/26/07, David Roe <[EMAIL PROTECTED]> wrote: > > In the course of thinking about coercion for p-adic rings, fields and > extensions, I've had some i

[sage-devel] Re: Coercion and categories in SAGE

2007-04-27 Thread David Roe
it get created? Would every ring, on > creation time, try and update the commutative diagram to include > itself? The more I think about it, the more having the (cached) > has_coerce_map_from() function return an actual homomorphism (or > None) seems to make sense. Thus one would traver

[sage-devel] Re: elliptic curve height bounds

2007-04-27 Thread David Roe
I'd be happy to do it. Having just read through the code, it looks like it shouldn't be hard, with the following potential hangups: Does SAGE have Tamagawa numbers, Kodaira symbols and minimal models for elliptic curves? I need to think a bit about the syntax for completions of number fields at pr

[sage-devel] Re: Coercion and categories in SAGE

2007-04-27 Thread David Roe
> > >> I think the square_root > >> function should take a parameter to distinguish between the three > >> types (with default 2? One can always do sqrt(2.0) or RR(sqrt(2)), > >> etc. and I don't think causal users would be confused by \sqrt{2} as > >> an answer). One could have actual functions fo

[sage-devel] Re: buglet in maxima list

2007-05-06 Thread David Roe
To some extent I agree. I think what pushed me to the other side is that if you're having to use an index such an object in the first place, you already have had to put the effort into learning that package. And for those people who know the package well and not SAGE well, preserving the native i

[sage-devel] Fwd: [sage-devel] Re: Teach a man to fish

2007-05-11 Thread David Roe
> 1) I started moving desolvers.py into SAGEHOME/devel/sage-main/build/sage/calculus/. Is this the appropriate place? Seems like a good place to me. > 2) You use "Integer(i)" instead of just "i", which seems unnecessary. I changed all of these, but I am wondering why they were as they were. The

[sage-devel] Re: a "press release"

2007-05-16 Thread David Roe
I have to agree with Martin here. And I'm worried that if we get a journalist involved, they won't be willing to include exactly what we want. The general readership of a newspaper is not going to be very interested that SAGE includes Python, GP/Pari, Maxima, Singular, I also think that the t

[sage-devel] RFC: the subresultant algorithm

2007-05-17 Thread David Roe
I may be implementing something like this for p-adics soon. It's one of the options for doing gcds meaningfully. If anyone else is interested in working on this, get in touch with me. David On 5/17/07, Michel <[EMAIL PROTECTED]> wrote: > > > It is rather frustrating that sage does not a have a g

[sage-devel] Re: Coercion bug

2007-05-22 Thread David Roe
These are all basically examples of sections of injective canonical maps going the other direction. There clearly shouldn't be a coerce method going that direction because the objects are not isomorphic. If we switch to a data-driven, category theoretic coercion system, it should be possible to r

[sage-devel] Re: symbol number radian degree

2007-05-22 Thread David Roe
I hate significant figures. Use real error propogation and standard deviations instead. David On 5/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > On Tue, 22 May 2007, David Harvey wrote: > > >> 1*meters + 2*meters*meters : NOT OK. > >> 1*meters + 2*feet = ... in feet or m

[sage-devel] Re: GPL plotting/drawing options

2007-05-30 Thread David Roe
> Another big issue with asymptote is that I think it fundamentally depends > on latex. Latex doesn't come pre-installed in OS X or most Linux > installs, > though of course it is easy to install in Linux. So far SAGE has got > quite > far with almost no dependencies -- latex is a pretty big dep

[sage-devel] Sage Enhancement Proposal: Number Fields

2007-06-12 Thread David Roe
ts/numbertheory/number_fields David Roe --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-d

[sage-devel] Re: Matrix question

2007-06-28 Thread David Roe
Sorry I didn't reply earlier. Implementing an is_symmetric function for matrices sounds like a good idea. But I think it should go in the base class: something like def is_symmetric(self): if self.ncols != self.nrows: return False cdef int i, j: for i from 1 <= i < self.nrows:

[sage-devel] Re: request for comments: ZZ(ZZ(FOO).binary(),2) == FOO

2007-06-29 Thread David Roe
I would agree on the little endian-ness. The lists of digits coming from p-adics (and printing in series mode) is little-endian. It would be nice to be consistent with this. I also agree with David Harvey's arguments. David On 6/29/07, David Harvey <[EMAIL PROTECTED]> wrote: > > > > On Jun 29,

[sage-devel] Saving graphs to Postscript

2007-07-13 Thread David Roe
Hey all, I ran into a problem saving a graph to postscript recently. Here's what I did: plot.options['plot_division'] = 4 plot.options['plot_points'] = 2 P=plot(sin(5/(x)), x,0,1) P.save('filename.eps', xmin = -.25, xmax = 1) Attempting to open the resulting file on my MacBook Pro with e

  1   2   3   4   5   6   7   8   9   10   >