[sage-devel] Re: Minor notebook CSS / HTML changes

2007-10-04 Thread Mike Hansen

 I like the idea of having a toggle.


Preliminary patch for toggle (and another misc. fix) up at
http://www.sagetrac.org/sage_trac/attachment/ticket/643/toggle.patch .
 I went the more conservative route and kept the very top bar visible.


 Wait a minute!  Your changes have made it so the topbar scrolls with the rest 
 of the page.
 I find this to be rather obnoxious, since one needs to scroll to the top to 
 say, restart
 a process which doesn't want to be interrupted and is spitting out a thousand
 lines a second.

I will take care of this eventually since there should be a nice way
to handle, but I'll need to do some restructuring.  I'm going to be
doing that in bits and pieces when I feel like taking a break from
writing math code :)

--Mike

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: let sage call the editor for you

2007-10-04 Thread Georg Muntingh

Indeed, that's great! What about adding an exclamation mark to the end
of the function you want to edit, so writing for instance factor! to
edit the source code of the function factor? Or is too easily
confused with the factorial?

Georg.


On Oct 4, 6:44 am, William Stein [EMAIL PROTECTED] wrote:
 On 10/3/07, Nils Bruin [EMAIL PROTECTED] wrote:



  A small enhancement that may be useful for people: since sage known
  about source file and line number of nearly any piece of code in sage,
  why not let sage open an editor window for you?

  Currently only works from the command line:

 http://sagetrac.org/sage_trac/ticket/768

  Please try it out and improve it.

 1) this is frickin' awesome!

 2) I put a proper patch up that integrates this into the tree, and made
 a lot of improvements to the code.

 3) This will be in sage-2.8.6, which is due to be released soon.

  -- William



 --
 William Stein
 Associate Professor of Mathematics
 University of Washingtonhttp://wstein.org


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Matrix coercion questions

2007-10-04 Thread Joel B. Mohler

Well, I'll reply to myself on this.  I made a ticket and attached a patch (to 
the ticket).  I do want some other people looking at it to see if there are 
more elegant fixes.  It does make a quite noticable runtime difference on 7x7 
matrices (I was rather amazed how much the difference was actually).

http://trac.sagemath.org/sage_trac/ticket/822

--
Joel

On Wednesday 03 October 2007 21:52, Joel B. Mohler wrote:
 Hi,

 It would have been nice to sit down in person with Robert and/or William
 about this at Clay, but I only fully realized the extent of my questions
 about 1.5 hours before I wanted to leave :).  Anyhow, the matrix
 multiplication process is looking a bit inefficient to me.

 Here's the situation:
 sage: M=MatrixSpace(ZZ,3,3)
 sage: m=M([range(9)])
 sage: n=M([range(1,10)])
 sage: prun m*n
  20 function calls in 0.000 CPU seconds
Ordered by: internal time
ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 10.0000.0000.0000.000 string:1(module)
 20.0000.0000.0000.000
 matrix_space.py:105(MatrixSpace) 10.0000.0000.0000.000
 matrix_space.py:282(change_ring) 10.0000.0000.0000.000
 matrix_space.py:306(base_extend) 10.0000.0000.0000.000
 matrix_space.py:648
 (matrix_space)
 30.0000.0000.0000.000 matrix_space.py:670(ncols)
 30.0000.0000.0000.000 matrix_space.py:681(nrows)
 ...

 The most alarming thing in that is the base_extend call.  Both have a
 base of ZZ (It also happens if both matrices are in MatrixSpace(QQ)).  
 This occurs because of a call to base_base_extend_canonical_sym_c around
 line 2075 in element.pyx.  The other thing that alarms me is the calls
 to matrix_space and MatrixSpace to construct a new parent space.  These
 are square matrices so we should not have to call out to the (python)
 parent ring to make a new parent ring.

 Now, both of these are easily enough fixed by an appropriate if statement
 above the offending lines of code.  However, it seems that this could all
 be fit into the coercion model a little more seamlessly.  It seems that the
 Matrix.__mul__ method pretty much takes over and does it's own thing.

 Any thoughts (especially from the coercion guru)?  Craig suggested that
 matrix multiplication could be viewed as an action in the coercion model,
 but I'm not sure I agree.  Mathematically, if element 'a' acts on element
 'b', I expect the result to have the same parent as 'b', but that isn't the
 case with non-square matrices in general.  I don't know if that definition
 of 'action' is the same as the coercion model's.

 --
 Joel

 

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: AMS Chicago sectional meeting

2007-10-04 Thread Mike Hansen

On 10/4/07, Jason Grout [EMAIL PROTECTED] wrote:

 Is anyone going to be at the AMS sectional meeting in Chicago this
 weekend?  If so, it would be great to meet you if you are there.  I
 realize that most people were at the recent SAGE days, so it's not
 likely, but I thought I'd ask anyway.

Hmm... I'm thinking about going since I'm not too far from the Chicago
area.  There is a talk on Saturday morning that I want to go to.  I'll
have to decide sometime soon.  But, if I do go, we should get in
touch.

--Mike

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: let sage call the editor for you

2007-10-04 Thread William Stein

On 10/4/07, Georg Muntingh [EMAIL PROTECTED] wrote:
 Indeed, that's great! What about adding an exclamation mark to the end
 of the function you want to edit, so writing for instance factor! to
 edit the source code of the function factor? Or is too easily
 confused with the factorial?

I think it is worth considering doing something like this, as a sort of
analogue of foo? and foo?? for help and source code.  I don't know
what the best notation will be yet.  I suggest we wait a few weeks
until people start actually getting a feeling for using the edit command,
and after that discuss the possibility of some sort of preparser
notation.

william

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: let sage call the editor for you

2007-10-04 Thread Fernando Perez

On 10/4/07, William Stein [EMAIL PROTECTED] wrote:

 On 10/4/07, Georg Muntingh [EMAIL PROTECTED] wrote:
  Indeed, that's great! What about adding an exclamation mark to the end
  of the function you want to edit, so writing for instance factor! to
  edit the source code of the function factor? Or is too easily
  confused with the factorial?

 I think it is worth considering doing something like this, as a sort of
 analogue of foo? and foo?? for help and source code.  I don't know
 what the best notation will be yet.  I suggest we wait a few weeks
 until people start actually getting a feeling for using the edit command,
 and after that discuss the possibility of some sort of preparser
 notation.

Minor note (I haven't been following in detail): the underlying
ipython below sage already has an %edit command (type %edit? for
details) than includes hooks for declaring custom editors, handling
the fact that there are editors whose commands exit immediately on
starting and others that block, etc.  Just an FYI.

Cheers,

f

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: let sage call the editor for you

2007-10-04 Thread Timothy Clemans

Will it be easy to revert back to the official library? Like will
there be a sage restore option? Also maybe there could be a prompt
that asks the user after they have done some editing if he would like
to incorporate those changes into his sage install.

On 10/4/07, William Stein [EMAIL PROTECTED] wrote:

 On 10/4/07, Fernando Perez [EMAIL PROTECTED] wrote:
   So they are two fairly different things, with the same name.
 
  %edit also takes arguments:
 
  ...
 
 - If the argument is the name of an object (other than a string),
  IPython will try to locate the file where it was defined and open the
  editor at the point where it is defined. You can use `%edit function`
  to load an editor exactly at the point where 'function' is defined,
  edit it and have the file be executed automatically.
 
  This is precisely the behavior you're describing.

 Actually it isn't precisely the same behavior. If I do

sage: %edit factor

 then this edits the factor function installed in

  SAGE_ROOT/local/lib/python/site-packages/sage/...

 (which will be overwritten by 'sage -br'), whereas

sage: edit(factor)

 edits

 SAGE_ROOT/devel/sage/sage/rings/arith.py

 Moreover, we'll extend the edit command so when called in the notebook
 it creates an textarea editor on the relevant file.

  -- William

 


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: let sage call the editor for you

2007-10-04 Thread William Stein

On 10/4/07, Fernando Perez [EMAIL PROTECTED] wrote:
 Minor note (I haven't been following in detail): the underlying
 ipython below sage already has an %edit command (type %edit? for
 details) than includes hooks for declaring custom editors, handling
 the fact that there are editors whose commands exit immediately on
 starting and others that block, etc.  Just an FYI.

The behavior of %edit is a lot different than the edit command
we're discussing.

%edit?
...
This command allows you to conveniently edit multi-line code right in
your IPython session.

---

The command we're discussing in Sage is different:

edit(foo)

for foo a function defined in the Sage library (right now, at least), finds
the original source file that defines foo, and puts you in an editor
to edit that file.  Doing sage -br, would then build and install the
resulting file.

So they are two fairly different things, with the same name.

William

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: let sage call the editor for you

2007-10-04 Thread Fernando Perez

On 10/4/07, William Stein [EMAIL PROTECTED] wrote:

 The command we're discussing in Sage is different:

 edit(foo)

 for foo a function defined in the Sage library (right now, at least), finds
 the original source file that defines foo, and puts you in an editor
 to edit that file.  Doing sage -br, would then build and install the
 resulting file.

 So they are two fairly different things, with the same name.

%edit also takes arguments:

...

   - If the argument is the name of an object (other than a string),
IPython will try to locate the file where it was defined and open the
editor at the point where it is defined. You can use `%edit function`
to load an editor exactly at the point where 'function' is defined,
edit it and have the file be executed automatically.

This is precisely the behavior you're describing.

%edit knows how to edit strings, sets of interactive input, macros,
functions defined in files, files specified by name, etc.

Cheers,

f

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Minor notebook CSS / HTML changes

2007-10-04 Thread Hamptonio

Thanks for working on this.  At the moment (on firefox at least) the
toggle function hides the top bar but doesn't increase the size of the
rest of the worksheet.  I am wondering if I should apply your first
patch and then the second?  I applied the toggle.patch on an
unmodified 2.8.5.1 version.  Also, the toggle is reset upon a page
refresh, although I don't know if that is a problem.

Marshall

On Oct 4, 1:04 am, Mike Hansen [EMAIL PROTECTED] wrote:
  I like the idea of having a toggle.

 Preliminary patch for toggle (and another misc. fix) up 
 athttp://www.sagetrac.org/sage_trac/attachment/ticket/643/toggle.patch.
  I went the more conservative route and kept the very top bar visible.

  Wait a minute!  Your changes have made it so the topbar scrolls with the 
  rest of the page.
  I find this to be rather obnoxious, since one needs to scroll to the top to 
  say, restart
  a process which doesn't want to be interrupted and is spitting out a 
  thousand
  lines a second.

 I will take care of this eventually since there should be a nice way
 to handle, but I'll need to do some restructuring.  I'm going to be
 doing that in bits and pieces when I feel like taking a break from
 writing math code :)

 --Mike


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Minor notebook CSS / HTML changes

2007-10-04 Thread Mike Hansen

On 10/4/07, Hamptonio [EMAIL PROTECTED] wrote:

 Thanks for working on this.  At the moment (on firefox at least) the
 toggle function hides the top bar but doesn't increase the size of the
 rest of the worksheet.  I am wondering if I should apply your first
 patch and then the second?  I applied the toggle.patch on an
 unmodified 2.8.5.1 version.  Also, the toggle is reset upon a page
 refresh, although I don't know if that is a problem.

Yeah, you won't get any increase in space unless you've also applied
the first patch.  They should be orthogonal enough that you can apply
them in either order.  I haven't given any thought yet about saving
state, but that would probably be good to do.

--Mike

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: let sage call the editor for you

2007-10-04 Thread William Stein

On 10/4/07, William Stein [EMAIL PROTECTED] wrote:
  This is precisely the behavior you're describing.

 Actually it isn't precisely the same behavior. If I do

Another difference is that

  sage: edit(foo)

will work even if the function foo is defined in compiled
Cython code.

The modifications needed to make all this work might
be too sage-specific for inclusion in IPython.  I'm not sure yet.


sage: %edit factor

 then this edits the factor function installed in

  SAGE_ROOT/local/lib/python/site-packages/sage/...

 (which will be overwritten by 'sage -br'), whereas

sage: edit(factor)

 edits

 SAGE_ROOT/devel/sage/sage/rings/arith.py

 Moreover, we'll extend the edit command so when called in the notebook
 it creates an textarea editor on the relevant file.

  -- William



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: let sage call the editor for you

2007-10-04 Thread Fernando Perez

On 10/4/07, William Stein [EMAIL PROTECTED] wrote:

 On 10/4/07, William Stein [EMAIL PROTECTED] wrote:
   This is precisely the behavior you're describing.
 
  Actually it isn't precisely the same behavior. If I do

 Another difference is that

   sage: edit(foo)

 will work even if the function foo is defined in compiled
 Cython code.

 The modifications needed to make all this work might
 be too sage-specific for inclusion in IPython.  I'm not sure yet.

Well, since the ipython one is meant to be fairly flexible, we'd be
happy to add in extension points to make it possible for sage to get
what it needs while reusing the existing machinery, if possible.

Obviously feel free to ignore all this, I just point out where the
underlying system is already close (if not identical) to what you need
in case it's possible for sage to better play with upstream.

Cheers,

f

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: minor issue: remainders with floats

2007-10-04 Thread William Stein

On 10/4/07, Hamptonio [EMAIL PROTECTED] wrote:

 I am porting some Mathematica code to sage and I ran into a minor
 issue.  I was using the Mod command in mathematica with argument types
 Mod[float,integer] to create a periodic function.  In sage, the mod
 command gives an error on that sort of input.  So I made a simple
 function:

 def float_mod(x,divisor):
 '''An extension of the mod command for floats.'''
 return x-floor(float(x)/divisor)*divisor

 which does what I want.  Is there something like this already in
 sage?

Yes, %, e.g.,

sage: a = float(1.2393); b = int(5)
sage: a % b
1.23930001
sage: a = float(1.2393); b = int(1)
sage: a % b
0.23937

That this doesn't work on Sage types, i.e., Sage real numbers
and Sage integers is because we didn't think to implement it:

sage: 1.2394 % 1

boom because we didn't think to implement.

Should this be added to Sage?  If somebody thinks so...
implement it and post a trac ticket.

 I know the normal python % operation does something similar but
 that's taken out by the preparser.

The Sage preparser doesn't touch %:

sage: preparse('a % b')
'a % b'


William

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] minor issue: remainders with floats

2007-10-04 Thread Hamptonio

I am porting some Mathematica code to sage and I ran into a minor
issue.  I was using the Mod command in mathematica with argument types
Mod[float,integer] to create a periodic function.  In sage, the mod
command gives an error on that sort of input.  So I made a simple
function:

def float_mod(x,divisor):
'''An extension of the mod command for floats.'''
return x-floor(float(x)/divisor)*divisor

which does what I want.  Is there something like this already in
sage?  I know the normal python % operation does something similar but
that's taken out by the preparser.


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: minor issue: remainders with floats

2007-10-04 Thread Hamptonio

Thanks for clearing up my confusion.  I will try to implement this. I
have added it as ticket #825.

Marshall

On Oct 4, 11:48 am, William Stein [EMAIL PROTECTED] wrote:
 On 10/4/07, Hamptonio [EMAIL PROTECTED] wrote:



  I am porting some Mathematica code to sage and I ran into a minor
  issue.  I was using the Mod command in mathematica with argument types
  Mod[float,integer] to create a periodic function.  In sage, the mod
  command gives an error on that sort of input.  So I made a simple
  function:

  def float_mod(x,divisor):
  '''An extension of the mod command for floats.'''
  return x-floor(float(x)/divisor)*divisor

  which does what I want.  Is there something like this already in
  sage?

 Yes, %, e.g.,

 sage: a = float(1.2393); b = int(5)
 sage: a % b
 1.23930001
 sage: a = float(1.2393); b = int(1)
 sage: a % b
 0.23937

 That this doesn't work on Sage types, i.e., Sage real numbers
 and Sage integers is because we didn't think to implement it:

 sage: 1.2394 % 1

 boom because we didn't think to implement.

 Should this be added to Sage?  If somebody thinks so...
 implement it and post a trac ticket.

  I know the normal python % operation does something similar but
  that's taken out by the preparser.

 The Sage preparser doesn't touch %:

 sage: preparse('a % b')
 'a % b'

 William


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: let sage call the editor for you

2007-10-04 Thread Nick Alexander

On Thu, 2007-10-04 at 09:50 -0400, William Stein wrote:
 On 10/4/07, Georg Muntingh [EMAIL PROTECTED] wrote:
  Indeed, that's great! What about adding an exclamation mark to the end
  of the function you want to edit, so writing for instance factor! to
  edit the source code of the function factor? Or is too easily
  confused with the factorial?
 
 I think it is worth considering doing something like this, as a sort of
 analogue of foo? and foo?? for help and source code.

I wanted to do this for IPython, but my thread with Fernando died way
back when.  I suggest foo???.  I often type x?, UP ? (giving x??), and
the natural one yields x???.

Nick


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: minor issue: remainders with floats

2007-10-04 Thread Nick Alexander

  I know the normal python % operation does something similar but
  that's taken out by the preparser.
 
 The Sage preparser doesn't touch %:
 
 sage: preparse('a % b')
 'a % b'

But 

sage: preparse('1.5 % 2')
'RR(1.5) % ZZ(2)'

From memory, but you get the idea.

Nick


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Matrix coercion questions

2007-10-04 Thread Robert Bradshaw

Craig's reply is a good summary of what I was going to say. I'm  
getting an

abort: unknown parent e91367eb18c1!

in trying to look at your patch. It sounds like a very good idea though.

On another note, however, the matrix coercion code has changed  
significantly in the (as-yet unapplied) patch at http:// 
trac.sagemath.org/sage_trac/ticket/624

- Robert


On Oct 4, 2007, at 6:53 AM, William Stein wrote:

 On 10/4/07, Joel B. Mohler [EMAIL PROTECTED] wrote:

 Well, I'll reply to myself on this.  I made a ticket and attached  
 a patch (to
 the ticket).  I do want some other people looking at it to see if  
 there are
 more elegant fixes.  It does make a quite noticable runtime  
 difference on 7x7
 matrices (I was rather amazed how much the difference was actually).

 http://trac.sagemath.org/sage_trac/ticket/822

 Thanks.  I think in general there has been essentially *no* tuning of
 small matrix arithmetic in Sage -- we've always cared about very large
 matrices.  It would be very good to do work toward tuning the small
 cases, like you're doing.  Thanks!

 William

 

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.8.3 on Solaris - A New Hope

2007-10-04 Thread mabshoff

Hello,

a short update:

 - Mark Watkins and I got sympow to compile and start without throwing
an error message on Solaris 10 x86, but it fails to compute anything -
we are debugging this.
 - I build a Solaris 10U4 x86 VMWare image that William also has. I
still need to install a proper build toolchain, but once that is done
I will pick up on the porting effort to Solaris 10 again.
 - I will also put my Dual Opteron/16GB Solaris 10 box online in the
near future, so if you would like an account just let me know.

Cheers,

Michael


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Toward 2.8.6 2.8.7

2007-10-04 Thread mabshoff

Hello,

2.8.6 is being testbuild before William releases a rc and hopefully
the final release will get release within 24 hours. So all new tickets
with patches should be assigned to 2.8.7 or later, unless you consider
it a blocker for 2.8.6. 2.8.7 is only a couple days away, so you won't
have to wait too long for the next release :).

Cheers,

Michael


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Matrix coercion questions

2007-10-04 Thread Robert Bradshaw

On Oct 4, 2007, at 1:35 PM, Joel B. Mohler wrote:

 On Thursday 04 October 2007 15:38, Robert Bradshaw wrote:
 Craig's reply is a good summary of what I was going to say. I'm
 getting an

 abort: unknown parent e91367eb18c1!

 Well, it looks like William succeeded in looking at it as the patch is
 changed.

Maybe I just didn't pull recently enough... (did an -upgrade though).

 Craig mentioned the call to MatrixSpace is because multiplication  
 of a matrix
 with QQ entries happens in the ZZ space.  I see that now, but it  
 wasn't the
 only call to MatrixSpace.  That is, multiplication of a matrix with ZZ
 entries also called MatrixSpace (forgetting that sometimes we are  
 square and
 can just use my existing parent).

Yes. Hopefully your patch fixes this.

 I'm glad the matrix coercion code changed!  It truly looked a bit  
 frightening.

Yeah, it was trying to handle each all sorts of things on a case-by- 
case basis between vectors and matrices... Now it's completely out of  
element.pyx, and is much shorter and easier to understand  
(implemented via Actions, where matrices act on vectors, etc.)

- Robert

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Matrix coercion questions

2007-10-04 Thread Joel B. Mohler

On Thursday 04 October 2007 15:38, Robert Bradshaw wrote:
 Craig's reply is a good summary of what I was going to say. I'm  
 getting an

 abort: unknown parent e91367eb18c1!

Well, it looks like William succeeded in looking at it as the patch is 
changed.

Craig mentioned the call to MatrixSpace is because multiplication of a matrix 
with QQ entries happens in the ZZ space.  I see that now, but it wasn't the 
only call to MatrixSpace.  That is, multiplication of a matrix with ZZ 
entries also called MatrixSpace (forgetting that sometimes we are square and 
can just use my existing parent).

I'm glad the matrix coercion code changed!  It truly looked a bit frightening.

--
Joel

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: nfrootsof1

2007-10-04 Thread John Voight

OK, done.  I'll see if I can make any progress on it myself.

JV


--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: nfrootsof1

2007-10-04 Thread William Stein

On 10/4/07, John Voight [EMAIL PROTECTED] wrote:

 OK, done.  I'll see if I can make any progress on it myself.

I've added that PARI function you want to Sage for the next release.
The patch is the following (just so you know).   The hardest part
was figuring out that the C library name of the function you
want is rootsof1 -- I did that by poking around in the PARI source
code; one could also do it by reading the PARI user's guide.

# HG changeset patch
# User William Stein [EMAIL PROTECTED]
# Date 1191556261 25200
# Node ID 0e8bb6f4816b48335b54b9ffed575f67e6d6aa80
# Parent  638d1bf0fe74f616f300638b576a7a765a36
Add a function for John Voight.

diff -r 638d1bf0fe74 -r 0e8bb6f4816b sage/libs/pari/gen.pyx
--- a/sage/libs/pari/gen.pyxThu Oct 04 19:46:31 2007 -0700
+++ b/sage/libs/pari/gen.pyxThu Oct 04 20:51:01 2007 -0700
@@ -4353,6 +4353,21 @@ cdef class gen(sage.structure.element.Ri
 _sig_on
 return P.new_gen(nfisisom(self.g, other.g))

+def nfrootsof1(self):
+
+nf.nfrootsof1()
+
+number of roots of unity and primitive root of unity in the
+number field nf.
+
+EXAMPLES:
+sage: nf = pari('x^2 + 1').nfinit()
+sage: nf.nfrootsof1()
+[4, [0, 1]~]
+
+_sig_on
+return P.new_gen(rootsof1(self.g))
+
 def nfsubfields(self, d=0):
 
 Find all subfields of degree d of number field nf (all

--~--~-~--~~~---~--~~
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-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---