[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread Dan Drake
On Wed, 10 Dec 2008 at 01:43AM -0600, Jason Grout wrote: > Cool. I just posted a note on Arxiv with a .sage program file, and > I'm seeing the same problem. (I thought the doctests passed, but > apparently they don't and I'm seeing the same problem; I think I got > around this once by "including"

[sage-support] Re: how to access last result

2008-12-10 Thread [EMAIL PROTECTED]
Yes, many thanks Robert On 10 Pro, 08:49, mabshoff <[EMAIL PROTECTED] dortmund.de> wrote: > On Dec 9, 11:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > Hi Robert, > > > Hello, is there any way how to access the last result in Sage? > > Something like % in Maxima? > > Thank you. > > Ro

[sage-support] Re: Accent marks in the Notebook

2008-12-10 Thread mabshoff
On Dec 9, 3:23 pm, acardh <[EMAIL PROTECTED]> wrote: Hi, > This works > html(r'Donde $\Sigma$ es la sumatoria de los números... etc.' ) > > but only works the first time. If you save & quit your work, after > trying again it fails. This is because when saving it converts > "números" to "números"

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread William Stein
On Wed, Dec 10, 2008 at 12:28 AM, Dan Drake <[EMAIL PROTECTED]> wrote: > On Wed, 10 Dec 2008 at 01:43AM -0600, Jason Grout wrote: >> Cool. I just posted a note on Arxiv with a .sage program file, and >> I'm seeing the same problem. (I thought the doctests passed, but >> apparently they don't and

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread Dan Drake
On Wed, 10 Dec 2008 at 04:40AM -0800, William Stein wrote: > Note that you could also submit a patch to Sage with the code you're > doctesting. I did that with all the tests from both of the books I > published, and I encourage you and many others to do the same with the > code from your article.

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread Jason Grout
Dan Drake wrote: > While I am adding to this thread, I'll mention a trick: in the article, > I want to mention how to get the .sage file -- but to do that, I need to > know the arXiv URL. But how do you find out the eprint number before you > submit? The answer is to make your submission early in

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread Jason Grout
William Stein wrote: > > That "sage -t foo.sage" doesn't import the functions somehow is a > sucky new-ish bug, that needs to be fixed ASAP, in my opinion. This > is related to recent major changes in how sage -t works on *.sage > files. See this ticket I just made: > > http://trac.sagema

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread Jason Grout
William Stein wrote: > Note that you could also submit a patch to Sage with the code you're > doctesting. > I did that with all the tests from both of the books I published, and > I encourage you and many others to do the same with the code from your > article. The code would go in a file > >

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread mabshoff
On Dec 10, 7:12 am, Jason Grout <[EMAIL PROTECTED]> wrote: > William Stein wrote: > > Note that you could also submit a patch to Sage with the code you're > > doctesting. > > I did that with all the tests from both of the books I published, and > > I encourage you and many others to do the same

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread mabshoff
On Dec 10, 7:22 am, mabshoff <[EMAIL PROTECTED] dortmund.de> wrote: > On Dec 10, 7:12 am, Jason Grout <[EMAIL PROTECTED]> wrote: > > Also, such code could be loaded into a running Sage session easily, > > something like the contributions directory of maxima.  Personally, I > > would love if our

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread Jason Grout
mabshoff wrote: > > >> Also, such code could be loaded into a running Sage session easily, >> something like the contributions directory of maxima. Personally, I >> would love if our special-purpose code (probably too specialized to be >> included in Sage) were accessible to anyone that had Sag

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread William Stein
On Wed, Dec 10, 2008 at 7:36 AM, Jason Grout <[EMAIL PROTECTED]> wrote: > > mabshoff wrote: >> >> >>> Also, such code could be loaded into a running Sage session easily, >>> something like the contributions directory of maxima. Personally, I >>> would love if our special-purpose code (probably to

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread mabshoff
On Dec 10, 7:48 am, "William Stein" <[EMAIL PROTECTED]> wrote: > On Wed, Dec 10, 2008 at 7:36 AM, Jason Grout > >> The ultimate goal should be to get code into Sage since there is > >> nearly always common code to factor out and getting more users for > >> some infrastructure bits in Sage ha

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread William Stein
On Wed, Dec 10, 2008 at 8:44 AM, mabshoff <[EMAIL PROTECTED]> wrote: > >> A Sage build is over a gigabyte, involves well over 5 million lines of >> code, and is probably bigger than any other single math software >> system in the world. And amazingly we're doing fine size-wise. I >> think we can

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread mabshoff
On Dec 10, 9:15 am, "William Stein" <[EMAIL PROTECTED]> wrote: > On Wed, Dec 10, 2008 at 8:44 AM, mabshoff > > > > <[EMAIL PROTECTED]> wrote: > > >> A Sage build is over a gigabyte, involves well over 5 million lines of > >> code, and is probably bigger than any other single math software > >> s

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread John Cremona
2008/12/10 mabshoff <[EMAIL PROTECTED]>: > but other than that there is nothing else in Sage I > would consider myself to be unhappy about. Wow, that's the best news I have heard all day! John --~--~-~--~~~---~--~~ To post to this group, send email to sage-supp

[sage-support] dealing with arrays and lists symbolically

2008-12-10 Thread olfa
Helo Sage community, I want to know if Sage could deal with symbolic arrays and lists (by symbolic I mean without specifying the concrete contents of list or array) For example I want to solve a system of equations containing lists and arrays like this (here A and A' are arrays; B and B' lists; x

[sage-support] How do I create a matrix whose elements are functions of the row & column indices?

2008-12-10 Thread Alasdair
The title pretty much says it all - for example, how would I create a 4x4 matrix whose (i,j)-th element is 1/(i+j)? Thanks, Alasdair --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email

[sage-support] Re: How do I create a matrix whose elements are functions of the row & column indices?

2008-12-10 Thread David Joyner
One way to do it (for a 10x10): sage: n = 10 sage: M = Matrix(n,n,[[1/(i+j) for i in range(1,11)] for j in range(1,11)]) sage: M [ 1/2 1/3 1/4 1/5 1/6 1/7 1/8 1/9 1/10 1/11] [ 1/3 1/4 1/5 1/6 1/7 1/8 1/9 1/10 1/11 1/12] [ 1/4 1/5 1/6 1/7 1/8 1/9 1/10 1/11 1/12 1/13] [ 1/5 1/6

[sage-support] Re: How do I create a matrix whose elements are functions of the row & column indices?

2008-12-10 Thread adrian
I think the order of the i and j is transposed (assuming row i and column j): sage: M = matrix(5,5,[[1/(i+j%2) for j in range(1,6)] for i in range (1,6)]) sage: M [1/2 1 1/2 1 1/2] [1/3 1/2 1/3 1/2 1/3] [1/4 1/3 1/4 1/3 1/4] [1/5 1/4 1/5 1/4 1/5] [1/6 1/5 1/6 1/5 1/6] s M = matrix(5,5,[[1/(i

[sage-support] Re: How do I create a matrix whose elements are functions of the row & column indices?

2008-12-10 Thread Alasdair
Thanks - I didn't know (being a COMPLETE newbie) about the "range" command. Where in the documentation would I find this? - I've had a bit of a search and couldn't find it. Thanks again, Alasdair --~--~-~--~~~---~--~~ To post to this group, send email to sage-su

[sage-support] Re: How do I create a matrix whose elements are functions of the row & column indices?

2008-12-10 Thread Arnim Littek
On Thu, 11 Dec 2008 13:23:30 Alasdair wrote: > Thanks - I didn't know (being a COMPLETE newbie) about the "range" > command. Where in the documentation would I find this? - I've had a > bit of a search and couldn't find it. http://docs.python.org/tutorial/controlflow.html#the-range-function Arn

[sage-support] Re: doctesting arbitrary Sage files?

2008-12-10 Thread Jason Grout
mabshoff wrote: > > > On Dec 10, 7:48 am, "William Stein" <[EMAIL PROTECTED]> wrote: >> On Wed, Dec 10, 2008 at 7:36 AM, Jason Grout > > > > The ultimate goal should be to get code into Sage since there is nearly always common code to factor out and getting more users for some