[sage-support] Why is __init__.py not tested?

2009-06-19 Thread Simon King
Dear Sage supporters, I wrote extensive doc tests for some package. But when I did sage -t -long -optional __init__.py apparently *nothing* was tested -- nevertheless it said that all tests passed. It even said that all tests passed when I inserted an error on purpose. So, why does this happen

[sage-support] How to doctest a pyx file?

2009-06-19 Thread Simon King
Dear Sage support, I am a bit puzzled since very similar things worked in the past. - I have a Cython extension module in a package that is installed in SAGE_LOCAL/lib/python2.5/site-packages/ and can be imported when starting sage, doing sage: from pGroupCohomology import mtx - I want to test

[sage-support] create a subdiagonal matrix quickly

2009-06-19 Thread Pierre
hi all, is there an easy way of creating a subdiagonal matrix, that is with 1 just under the diagonal and 0's elsewhere ? this is for students, we'd like to convince them that sage is easy, so i'd rather not write a function myself (which of course would be easy). Apparently (i hear this from a c

[sage-support] Re: create a subdiagonal matrix quickly

2009-06-19 Thread Harald Schilly
On Jun 19, 12:50 pm, Pierre wrote: > i know numpy does it, so is it there for sage matrices also ? i don't think so, how is the numpy syntax? I think this should be an enhancement to Sage's "sage.matrix.constructor.diagonal_matrix" function, introducing an "offset" parameter. H --~--~-~

[sage-support] Re: create a subdiagonal matrix quickly

2009-06-19 Thread William Stein
On Fri, Jun 19, 2009 at 1:55 PM, Harald Schilly wrote: > > On Jun 19, 12:50 pm, Pierre wrote: >> i know numpy does it, so is it there for sage matrices also ? > > i don't think so, how is the numpy syntax? I think this should be an > enhancement to Sage's "sage.matrix.constructor.diagonal_matrix"

[sage-support] Re: Why is __init__.py not tested?

2009-06-19 Thread William Stein
On Fri, Jun 19, 2009 at 9:34 AM, Simon King wrote: > > Dear Sage supporters, > > I wrote extensive doc tests for some package. But when I did >  sage -t -long -optional __init__.py > apparently *nothing* was tested -- nevertheless it said that all tests > passed. > > It even said that all tests pa

[sage-support] Re: create a subdiagonal matrix quickly

2009-06-19 Thread Jason Grout
Harald Schilly wrote: > On Jun 19, 12:50 pm, Pierre wrote: >> i know numpy does it, so is it there for sage matrices also ? > > i don't think so, how is the numpy syntax? I think this should be an > enhancement to Sage's "sage.matrix.constructor.diagonal_matrix" > function, introducing an "offse

[sage-support] Backup objects

2009-06-19 Thread kcrisman
Dear Support, Just a really quick question - if I want to externally backup my Sage notebook, I only have to copy the file $HOME/.sage/sage_notebook/ nb.sobj to my external server, correct? Or would I need to tar up the whole sage_notebook directory, with all its attendant stuff? Thanks! - kcr

[sage-support] Re: create a subdiagonal matrix quickly

2009-06-19 Thread Pierre
thanks for this. You might be amused by what my colleague said about SAGE, when we were talking about whether or not using numpy: "SAGE is like the British train system: you have to worry about which company to use." Coming from a french person, this is actually extremely negative. But i thought

[sage-support] Re: Backup objects

2009-06-19 Thread William Stein
On Fri, Jun 19, 2009 at 5:32 PM, kcrisman wrote: > > Dear Support, > > Just a really quick question - if I want to externally backup my Sage > notebook, I only have to copy the file $HOME/.sage/sage_notebook/ > nb.sobj to my external server, correct? NO!!! >  Or would I need to tar up th

[sage-support] Re: Backup objects

2009-06-19 Thread kcrisman
> > > Just a really quick question - if I want to externally backup my Sage > > notebook, I only have to copy the file $HOME/.sage/sage_notebook/ > > nb.sobj to my external server, correct? > > NO!!! Okay :) > > >  Or would I need to tar up the > > whole sage_notebook directory, with a

[sage-support] Re: Why is __init__.py not tested?

2009-06-19 Thread Simon King
Dear William, On 19 Jun., 15:28, William Stein wrote: > __init__.py and all.py weren't tested because I never put code and > examples in there, and didn't think anybody else would ever either, > and wanted to avoid wasting Sage startup time. I see. The reason for me putting actual code into __

[sage-support] Re: create a subdiagonal matrix quickly

2009-06-19 Thread Simon King
Hi! On 19 Jun., 18:50, Pierre wrote: > thanks for this. You might be amused by what my colleague said about > SAGE, when we were talking about whether or not using numpy: > > "SAGE is like the British train system: you have to worry about which > company to use." Correct me if I'm wrong, but is

[sage-support] Re: How to doctest a pyx file?

2009-06-19 Thread Simon King
Hi! On 19 Jun., 10:30, Simon King wrote: > Note that things worked in the past, when I had the following: > - mtx.so was in the current directory > - I set SAGE_PATH to the current directory > - I did sage -t -long -optional mtx.pyx > > What is the difference? Apparently the difference lies in