[sage-support] Re: strange behavior

2009-06-15 Thread William Stein

On Mon, Jun 15, 2009 at 6:07 AM, Florian Beutlerflorian.beut...@gmx.de wrote:

 hello

 flor...@florian-laptop:~/Gadget-2.0.3/Analysis$ sage -v
 | SAGE Version 3.0.5, Release Date: 2008-07-11

 my operation system is ubuntu 9,04

 What are the paths below to /usr/lib?

 I don't know what you mean...
 regards
 florian

You should apt-get remove sagemath, then install sage from source or
one of the binaries
at http://sagemath.org/.  The Sage included in Debian/Ubuntu is
extremely out of date.

William


 On Jun 14, 10:00 pm, William Stein wst...@gmail.com wrote:
 On Sun, Jun 14, 2009 at 6:48 AM, Florian Beutlerflorian.beut...@gmx.de 
 wrote:

  yep sorry... here is the error message

 What version of Sage are you using?  On what computer? Etc. etc.
 What are the paths below to /usr/lib?

  -- William





  flor...@florian-laptop:~/sage$ sage friction.py
  Ok... dann legen wir mal los!

  step1: definition of the density profile
  99824085.5683

  step2: definition of the circular velocity
  3.51331142172386

  step3: definition of the integrated mass
  229643.853879355

  step3: definition of the integrated mass
  Traceback (most recent call last):
   File friction.py, line 29, in module
     print mass(r).n(),\n
   File /home/florian/sage/functions.py, line 21, in mass
     i_term = integral(x**2*rho(x), x, 0, r)
   File /usr/lib/python2.5/site-packages/sage/misc/functional.py,
  line 436, in integral
     return x.integral(*args, **kwds)
   File /usr/lib/python2.5/site-packages/sage/calculus/calculus.py,
  line 2508, in integral
     return self.parent()(self._maxima_().integrate(v, a, b))
   File /usr/lib/python2.5/site-packages/sage/interfaces/maxima.py,
  line 1601, in integral
     return I(var, min, max)
   File /usr/lib/python2.5/site-packages/sage/interfaces/expect.py,
  line 1182, in __call__
     return self._obj.parent().function_call(self._name, [self._obj] +
  list(args))
   File /usr/lib/python2.5/site-packages/sage/interfaces/expect.py,
  line , in function_call
     return self.new(%s(%s)%(function, ,.join([s.name() for s in
  args])))
   File /usr/lib/python2.5/site-packages/sage/interfaces/expect.py,
  line 1013, in new
     return self(code)
   File /usr/lib/python2.5/site-packages/sage/interfaces/maxima.py,
  line 377, in __call__
     return Expect.__call__(self, x)
   File /usr/lib/python2.5/site-packages/sage/interfaces/expect.py,
  line 948, in __call__
     return cls(self, x)
   File /usr/lib/python2.5/site-packages/sage/interfaces/expect.py,
  line 1214, in __init__
     self._name = parent._create(value)
   File /usr/lib/python2.5/site-packages/sage/interfaces/expect.py,
  line 1092, in _create
     self.set(name, value)
   File /usr/lib/python2.5/site-packages/sage/interfaces/maxima.py,
  line 855, in set
     self._eval_line(cmd)
   File /usr/lib/python2.5/site-packages/sage/interfaces/maxima.py,
  line 567, in _eval_line
     self._expect_expr()
   File /usr/lib/python2.5/site-packages/sage/interfaces/maxima.py,
  line 457, in _expect_expr
     i = self._expect.expect(expr)
   File /usr/lib/python2.5/site-packages/pexpect.py, line 1311, in
  expect
     return self.expect_list(compiled_pattern_list, timeout,
  searchwindowsize)
   File /usr/lib/python2.5/site-packages/pexpect.py, line 1325, in
  expect_list
     return self.expect_loop(searcher_re(pattern_list), timeout,
  searchwindowsize)
   File /usr/lib/python2.5/site-packages/pexpect.py, line 1396, in
  expect_loop
     raise EOF (str(e) + '\n' + str(self))
  pexpect.EOF: End Of File (EOF) in read_nonblocking(). Exception style
  platform.
  pexpect.spawn object at 0x3cfe890
  version: 2.3 ($Revision: 399 $)
  command: /usr/bin/maxima
  args: ['/usr/bin/maxima', '-p', '/usr/lib/sagemath/local/bin/sage-
  maxima.lisp']
  searcher: searcher_re:
     0: re.compile(\(\%i[0-9]+\))
     1: re.compile(zero or nonzero?)
     2: re.compile(an integer?)
     3: re.compile(positive, negative, or zero?)
     4: re.compile(positive or negative?)
     5: re.compile(Break [0-9]+)
  buffer (last 100 chars):
  before (last 100 chars):
  `rat' replaced 1.0 by 1/1 = 1.0

  `rat' replaced 1.234567901234568 by 100/81 = 1.234567901234568

  after: class 'pexpect.EOF'
  match: None
  match_index: None
  exitstatus: None
  flag_eof: True
  pid: 4147
  child_fd: 3
  closed: False
  timeout: None
  delimiter: class 'pexpect.EOF'
  logfile: None
  logfile_read: None
  logfile_send: None
  maxread: 1
  ignorecase: False
  searchwindowsize: None
  delaybeforesend: 0
  delayafterclose: 0.1
  delayafterterminate: 0.1
  Maxima crashed -- automatically restarting.
  End Of File (EOF) in read_nonblocking(). Exception style platform.
  pexpect.spawn object at 0x3cfe890
  version: 2.3 ($Revision: 399 $)
  command: /usr/bin/maxima
  args: ['/usr/bin/maxima', '-p', '/usr/lib/sagemath/local/bin/sage-
  maxima.lisp']
  searcher: searcher_re:
     0: re.compile(\(\%i[0-9]+\))
  buffer (last 100 chars):
  before (last 100 chars):
  after: class 

[sage-support] Re: Mac OS X 10.4 32bit G4 Support

2009-06-15 Thread paramaniac

I've tried ./sage -bdist 4.0.1-OSX10.4-PowerPC, the new Sage folder is
now 1.36GB and the .dmg file dwindled to 365MB:
http://n.ethz.ch/student/lukasre/download/
Sorry for waisting your time.

Regards,
Lukas
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Mac OS X 10.4 32bit G4 Support

2009-06-15 Thread paramaniac

I've tried ./sage -bdist 4.0.1-OSX10.4-PowerPC, the new Sage folder is
now 1.36GB and the .dmg file dwindled to 365MB:
http://n.ethz.ch/student/lukasre/download/
Sorry for wasting your time.

Regards,
Lukas
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: www.sagenb.org vs alpha.sagenb.org

2009-06-15 Thread William Stein

 The main purpose of my email was to make a point about trusting the
 answers being crucial to the sage project. After sending the email I
 realised another viewpoint: if you stuck to a safe version of sage
 on sagenb.org, few people would use the alpha server and you'd lose a
 great opportunity to find bugs in the latest releases, which is a pay-
 off for providing the computational resources of sagenb.org.

True.  jokeAlso if we stuck to a safe version of Sage, it might
look like this:

#includestdio.h
int main(void) {
printf(sage: \n);
}

/joke   :-)

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Posting in sage-windows

2009-06-15 Thread William Stein

On Mon, Jun 15, 2009 at 1:04 AM, kilucaskevin.lu...@concave.co.uk wrote:

 My apologies for posting about the sage-windows group within the sage-
 support group but I posted 3 messages (two replies and a new topic)
 into sage-windows a couple of weeks back and they're still not showing
 up in the message lists. And I wasn't sure how else to ask for help in
 posting there.

 I'm listed as a member of that group and did get an email notification
 that some messages had been posted.

 So do I need to do anything special to post there perhaps?

That was my mistake.  I'm really sorry for your message not getting
posted promptly.  It should in the future.

William


 Thanks

 Kevin


 




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

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Dimensional Analysis or Unit Conversion capability?

2009-06-15 Thread Maurizio

I am wondering whether somebody contacted the author.

Let me cite him (everything is better explained in the wiki):

- I have another idea for further development, which is more
technical. It is to remove the unit dictionary stored as Unum's class
attributes (which is the cornerstone of the current design !).
Currently, the unit symbol strings are used as keys for this
dictionary; numerous dictionary lookups may occur at unit
normalization or unification. The idea now is that each unum contains
direct references to other unums representing its inner units. More
precisely, basic units (as meter, second, etc) are, by definition,
terminal unums (without references); derived units (as Newton, Joule,
etc) have a dictionary with, as keys, unums representing basic/derived
units, and, as values, their exponents; finally, any quantity may be
derived with the same idea. The big picture at the end is that all
quantities, units and conversion rules boils down to a single
connected graph where each node is a unum. This redesign should save a
lot in time and memory consumption. It requires however to rewrite
almost all Unum's methods. I wrote a small prototype to validate the
concept, with promising results.

This is coming from the last entry of Unum Diary (
http://home.scarlet.be/be052320/Unum_diary.html ). Do you think could
be possible for us to get the prototype from him, and to adapt it to
work with SAGE, in order to take advantage of his experience in
designing a Units of Measurement package, and at the same time to get
the chance to make it work well with SAGE in the early phase of its
development?
The result could be the same to make Quantities work with SAGE, but I
am doubtful if it would take less time to make Quantities work well in
SAGE, rather than adopt this Unum (let's say 5.0 alpha) and possibly
invite the original author to cooperate with us, if he's willing to
and has some spare time.

Regards

Maurizio

On Jun 15, 12:10 am, Maurizio maurizio.gran...@gmail.com wrote:
 I added some comments to the wiki about Quantities as well.

 From the point of view of the code, I can give my impression, but I'm
 not experienced in programming.
 Unum looks simple and understandable.
 Quantities looks more complex, and even finding the right way to look
 at is difficult for me. Anyway, this could also mean that the package
 is refined and designed from an experienced programmer, so this could
 be a pro. Anyway, that would certainly prevent people like me to work
 on it :)

 Regards

 Maurizio

 On 14 Giu, 23:38, Maurizio maurizio.gran...@gmail.com wrote:

   as is going to be a keyword in Python 2.6 so this will actually have
   to be changed.  It makes sense to do it before it's in Sage since it
   will break code.

  Yes, indeed that's even coming out when executing its own test suite:
  Python is warning that as is a keyword in 2.6.

Note that the license is GPLv2, not GPLv2+,
   http://home.scarlet.be/be052320/license.txt
Maybe someone should contact the package author about that
before a definite move is made?

   All of the license statements on the source code itself are GPLv2+.

   There are also a few changes that should to be done such as something like

   try:
      from sage.all import Integer
      ONE = Integer(1)
   except ImportError:
      ONE = 1.0

   so that it plays nicer with exact arithmetic.

   --Mike

  William, as I stated in the wiki, I'm gaining interest toward Unum. I
  was going to include some examples of Quantites in SAGE as well (for
  par condicio, as they say in Italy).

  I don't know what about contacting the author or modifying the code,
  but please consider also the effort needed to make it work with the
  non-arithmetic functions:
  1. trigonometric
  2. integration, derivation
  3. possibly compatibility with symbolics?

  I would consider point (1) the minimum necessary to avoid making Unum
  (or any other units package) inclusion meaningless.

  Thanks for the interest, anyway

  Regards

  Maurizio
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Dimensional Analysis or Unit Conversion capability?

2009-06-15 Thread William Stein

On Mon, Jun 15, 2009 at 12:24 PM, Mauriziomaurizio.gran...@gmail.com wrote:

 I am wondering whether somebody contacted the author.

 Let me cite him (everything is better explained in the wiki):

 - I have another idea for further development, which is more
 technical. It is to remove the unit dictionary stored as Unum's class
 attributes (which is the cornerstone of the current design !).
 Currently, the unit symbol strings are used as keys for this
 dictionary; numerous dictionary lookups may occur at unit
 normalization or unification. The idea now is that each unum contains
 direct references to other unums representing its inner units. More
 precisely, basic units (as meter, second, etc) are, by definition,
 terminal unums (without references); derived units (as Newton, Joule,
 etc) have a dictionary with, as keys, unums representing basic/derived
 units, and, as values, their exponents; finally, any quantity may be
 derived with the same idea. The big picture at the end is that all
 quantities, units and conversion rules boils down to a single
 connected graph where each node is a unum. This redesign should save a
 lot in time and memory consumption. It requires however to rewrite
 almost all Unum's methods. I wrote a small prototype to validate the
 concept, with promising results.

 This is coming from the last entry of Unum Diary (
 http://home.scarlet.be/be052320/Unum_diary.html ). Do you think could
 be possible for us to get the prototype from him, and to adapt it to
 work with SAGE, in order to take advantage of his experience in
 designing a Units of Measurement package, and at the same time to get
 the chance to make it work well with SAGE in the early phase of its
 development?
 The result could be the same to make Quantities work with SAGE, but I
 am doubtful if it would take less time to make Quantities work well in
 SAGE, rather than adopt this Unum (let's say 5.0 alpha) and possibly
 invite the original author to cooperate with us, if he's willing to
 and has some spare time.

Well it can't hurt to write to him and ask what he thinks...

There is also the fact that Sage has rings, elements, parents, a
coercion model, etc. which might throw a monkey wrench into everything
(I don't know).



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

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: linbox bug?

2009-06-15 Thread William Stein

On Wed, Jun 10, 2009 at 6:03 PM, Yannyannlaiglecha...@gmail.com wrote:

 --
 | Sage Version 4.0.1, Release Date: 2009-06-06                       |
 | Type notebook() for the GUI, and license() for information.        |
 --
 sage: A=matrix(GF(3),2,[0,0,1,2])
 sage: R.x=GF(3)[]
 sage: D={ x:0 , x+1:0 , x^2+x:0 }
 sage: for i in range(10):
 :         D[A._minpoly_linbox()]+=1
 :
 sage: D
 {x: 38266, x + 1: 29397, x^2 + x: 32337}


You're absolutely right!  This *sucks* -- it seems like nothing we
have ever wrapped in Linbox is right at first.  Hopefully the issue is
that somehow the algorithm is only supposed to be probabilistic, and
we're just misusing it in sage (quite possible).

Anyway, Clement Pernet will be at Sage Days next week, and we'll sort this out.
Many thanks for brining this to our attention!

This is now:

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

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] drawing graphs

2009-06-15 Thread Dominique Manchon

Hello!

I'm a newcomer into Sage and Python. When I want to draw some
graphical
representation of graphs I get problems : the vertices are partially
cut-off. They almost disappear when the graph looks like a vertical
ladder. For example:

arbre1={0:[1],1:[]}
arbre2={0:[1,2],1:[],2:[]}
A1=Graph(arbre1)
AA1=A1.plot(vertex_size=120, layout=tree,
tree_orientation=up,tree_root=0)
A2=Graph(arbre2)
AA2=A2.plot(vertex_size=120, layout=tree,
tree_orientation=up,tree_root=0)
AA1.show(figsize=[2,2]);AA2.show(figsize=[2,2])

How can I cure this?

Another related question : which values are allowed for figsize[-,-]?
Very
often I would like quite tiny drawings (hence small values) but then I
get
an error message. For example the same as above with figsize=[1,1]
returns
the message below. Why?

Thanks in advance for the help.

Dominique Manchon

libpng error: Image width or height is zero in IHDR
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/sage/sagenb/sage_notebook/worksheets/manchon/4/code/
24.py,
line 13, in module
AA1.show(figsize=[_sage_const_1 ,_sage_const_1
]);AA2.show(figsize=[_sage_const_1 ,_sage_const_1 ])
  File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/
Jinja-1.2-py2.5-linux-x86_64.egg/,
line 1, in module

  File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/sage/
plot/plot.py,
line 1291, in show
hgridlinesstyle=hgridlinesstyle)
  File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/sage/
plot/plot.py,
line 1616, in save
canvas.print_figure(filename, dpi=dpi)
  File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/
matplotlib/backend_bases.py,
line 1453, in print_figure
**kwargs)
  File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/
matplotlib/backends/backend_agg.py,
line 334, in print_png
filename_or_obj, self.figure.dpi)
RuntimeError: Error building image

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Inheritance from sage.symbolic.expression.Expression

2009-06-15 Thread Nicolas

Dear Burcin

Thanks for all
It seems the patch works fine for my application, at least this is
what the first tests says !

I will get back to here if I see issues

Nicolas

On 12 juin, 11:22, Burcin Erocal bur...@erocal.org wrote:
 Hi Nicolas,

 On Fri, 12 Jun 2009 02:09:08 -0700 (PDT)

 Nicolas nicolas.fresseng...@gmail.com wrote:
  Just one quick question about patches, I have just changed the
  expression.pyx file and ran another make (which took not so much
  time). But it does not seem to work. Is this simple way of applying
  patch enough or do I have to go through the mercurial system ?

 You need to do

 ./sage -br

 From your other message:

  I will try out your patch. Why do you say that does not solve my
  problem ?

 You'll see that whenever you perform arithmetic on the new objects,
 you'll end up with Expression's again.

  assuming the class esub was defined as in my previous message 
 sage: var('x,y,z')
 (x, y, z)
 sage: t = x * y^z
 sage: u = esub(SR, t)
 sage: u
 y^z*x
 sage: type(u)
 class '__main__.esub'
 sage: type(u*u)
 type 'sage.symbolic.expression.Expression'

 Let's see how far you get with the patch. I'll try to see if there is
 a simple fix to make Expression behave well w.r.t. object oriented
 design.

 Cheers,
 Burcin
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: drawing graphs

2009-06-15 Thread William Stein

On Mon, Jun 15, 2009 at 12:55 PM, Dominique
Manchonmanc...@math.univ-bpclermont.fr wrote:

 Hello!

 I'm a newcomer into Sage and Python. When I want to draw some
 graphical
 representation of graphs I get problems : the vertices are partially
 cut-off. They almost disappear when the graph looks like a vertical
 ladder. For example:

Despite years of work, drawing graphs in Sage is still pretty broken.
This is very clear to anybody who uses the Sage graph code for any
amount of time.

The graph plotting works well for:

* circular planar graphs
* all the graphs you get by typing graphs.tab key (thanks Emily)
* sometimes for connected graphs.

It's *terrible* for graphs with multiple components.  And for random
small graphs, as you say it chops off vertices, and generally looks
very unpolished.

My understanding is that the following work has been done on graph
plotting in Sage:

* take the networkx graph plotting code and make it actually work from sage
* nice layouts for everything in graphs.tab key
* make it so the spring layout algorithm runs very very quickly
* add support for loops and multiple edges (thanks emily)
* add a layout=circular algorithm
* add a layout=tree algorithm
* lots of support for colorings (in sage-4.0.1)

It's pretty clear substantial further work is still needed.  I taught
an undergrad course last quarter using Sage, and found plotting with
anything but layout=circular to be sort of embarrassing.  But I
didn't do anything about it.

Please -- Emily and Robert -- don't be at all offended by this email.
You two have both dramatically improved graph plotting in Sage over
what networkx offers, and Emily's predesigned layouts for the graph
families are beautiful.I just think it is important to acknowledge
that on random input graphs plotting has a ways to go.

 -- William


 arbre1={0:[1],1:[]}
 arbre2={0:[1,2],1:[],2:[]}
 A1=Graph(arbre1)
 AA1=A1.plot(vertex_size=120, layout=tree,
 tree_orientation=up,tree_root=0)
 A2=Graph(arbre2)
 AA2=A2.plot(vertex_size=120, layout=tree,
 tree_orientation=up,tree_root=0)
 AA1.show(figsize=[2,2]);AA2.show(figsize=[2,2])

 How can I cure this?

 Another related question : which values are allowed for figsize[-,-]?
 Very
 often I would like quite tiny drawings (hence small values) but then I
 get
 an error message. For example the same as above with figsize=[1,1]
 returns
 the message below. Why?

 Thanks in advance for the help.

 Dominique Manchon

 libpng error: Image width or height is zero in IHDR
 Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/sage/sagenb/sage_notebook/worksheets/manchon/4/code/
 24.py,
 line 13, in module
    AA1.show(figsize=[_sage_const_1 ,_sage_const_1
 ]);AA2.show(figsize=[_sage_const_1 ,_sage_const_1 ])
  File
 /home/sage/sage_install/sage/local/lib/python2.5/site-packages/
 Jinja-1.2-py2.5-linux-x86_64.egg/,
 line 1, in module

  File
 /home/sage/sage_install/sage/local/lib/python2.5/site-packages/sage/
 plot/plot.py,
 line 1291, in show
    hgridlinesstyle=hgridlinesstyle)
  File
 /home/sage/sage_install/sage/local/lib/python2.5/site-packages/sage/
 plot/plot.py,
 line 1616, in save
    canvas.print_figure(filename, dpi=dpi)
  File
 /home/sage/sage_install/sage/local/lib/python2.5/site-packages/
 matplotlib/backend_bases.py,
 line 1453, in print_figure
    **kwargs)
  File
 /home/sage/sage_install/sage/local/lib/python2.5/site-packages/
 matplotlib/backends/backend_agg.py,
 line 334, in print_png
    filename_or_obj, self.figure.dpi)
 RuntimeError: Error building image

 




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

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Multiply first terms of Dirichlet powerseries

2009-06-15 Thread William Stein

On Wed, Jun 10, 2009 at 4:14 PM, Ton
Biegstraatenton.biegstraa...@gmail.com wrote:
 Hi,
 As an example I multiplied the first terms of 2 Dirichlet powerseries. The
 result is also a Dirichlet powerserie, but how do I get the result in that
 shape?
 ---

 sage: a(x) = sum([1/(n^x) for n in range(1,4)])
 sage: b(x) = a(x)*a(x)
 sage: print a(x): ,a(x), \nproduct: , a(x)*a(x), \nb(x): ,
 b(x).expand()
 a(x):  1/2^x + 1/3^x + 1
 product:  (1/2^x + 1/3^x + 1)^2
 b(x):  2/2^x + 1/(2^x)^2 + 2/3^x + 2/(2^x*3^x) + 1/(3^x)^2 + 1
 ---

 I like to get things like 2^x*3^x = 6^x and combine all n^x terms, as I'm
 only interested in the denominators of that terms.
 The result should be:
 1 + 2/2^x + 2/3^x + 3/4^x ...
 each denominator is the number of divisors of the number in the nominator if
 you use enough terms in the original series.
 Is that possible and of course how?

You should read this wiki page, which should explain to you how to code
up the Dirichlet convolution, hence explicit form of product of
two Dirichlet series as a Dirichlet series:

http://en.wikipedia.org/wiki/Dirichlet_convolution


William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



Re: [linbox-devel] Re: [sage-support] linbox bug?

2009-06-15 Thread William Stein

2009/6/15 Jean-Guillaume Dumas jean-guillaume.du...@imag.fr:

 William Stein wrote:
 On Wed, Jun 10, 2009 at 6:03 PM, Yannyannlaiglecha...@gmail.com wrote:

 --
 | Sage Version 4.0.1, Release Date: 2009-06-06                       |
 | Type notebook() for the GUI, and license() for information.        |
 --
 sage: A=matrix(GF(3),2,[0,0,1,2])
 sage: R.x=GF(3)[]
 sage: D={ x:0 , x+1:0 , x^2+x:0 }
 sage: for i in range(10):
 :         D[A._minpoly_linbox()]+=1
 :
 sage: D
 {x: 38266, x + 1: 29397, x^2 + x: 32337}



 You're absolutely right!  This *sucks* -- it seems like nothing we
 have ever wrapped in Linbox is right at first.  Hopefully the issue is
 that somehow the algorithm is only supposed to be probabilistic, and
 we're just misusing it in sage (quite possible).

 Anyway, Clement Pernet will be at Sage Days next week, and we'll sort this 
 out.
 Many thanks for brining this to our attention!

 This is now:

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

 Well, I think this was corrected in linbox-1.1.6:

We're using linbox-1.1.6 in Sage.


 The minpoly algorithm used depends on which method you are using from
 LinBox of course but,
 If you use the solution minpoly you will get the blackbox algorithm
 (just like if you specify minpoly(pol, mat, Method::Blackbox()))
 then (since sept 2008 and 1.1.6) we will end up using an extension field
 to compute the minpoly (on my machine it will be GF(3^10)) and then
 I e.g. got the following result for one try (the algorithm is still
 probabilistic, but has a much larger success rate, roughly around 1/3^10):

Here's what we're using:

void linbox_modn_dense_minpoly(mod_int modulus, mod_int **mp, size_t*
degree, size_t n, mod_int **matrix, int do_minpoly) {

ModInt F((double)modulus);

size_t m = n;

DenseMatrixModInt A(linbox_new_modn_matrix( modulus, matrix, m, m));

GivPolynomialModInt::Element m_A;

if (do_minpoly)
minpoly(m_A, A);
else
charpoly(m_A, A);

(*mp) = new mod_int[m_A.size()];
*degree = m_A.size() - 1;
for (size_t i=0; i = *degree; i++) {
(*mp)[i] = (mod_int)m_A[i];
}

}

This is from the file interfaces/linbox-sage.C, which ships with linbox.

Many thanks for clarifying that minpoly fails with some probability,
and that we need to call it multiple times, take lcm's, and force the
user to give the option proof=False to use it.

Just out of curiosity, is there any provably correct minpoly in
linbox?   We don't have one in Sage at all, so it would be useful so
we don't have to implement one from scratch.

William



   3 minimal Polynomials are x^2 +x, 3 minimal polynomial are x+1, 4
 minimal polynomials are x

 Now for a so small matrix it could be better to use a dense version,
 which can be called by minpoly(pol,mat,Method::Elimination()).
 If i am correct this dense version is also probabilistic (choice of the
 Krylov non-zero vector) and therefore should also pick vectors from an
 extension.
 This is not the case in 1.1.6.
 Clément can you confirm this ? If so it should be easy to fix, the same
 way we fixed Wiedemann.

 For your example matrix in some of the cases, when vectors [1,1], and
 [2,2] are chosen the Krylov space has rank 1, whereas for other non zero
 vectors  it has rank 2 and
 thus the dense minbpoly will be x^2+x or x+1 ...

 btw, the returned polynomial is always a factor of the true polynomial,
 therefore to get a 1/3^{10k} probability  of success it will be
 sufficient to perform the lcm of k runs.

 Best,

 --
                                        Jean-Guillaume Dumas.
 
 jean-guillaume.du...@imag.fr                   Tél.: +33 476 514 866
 Université Joseph Fourier, Grenoble I.         Fax.: +33 476 631 263
 Laboratoire Jean Kuntzmann, Mathématiques Appliquées et Informatique
 51, avenue des Mathématiques. LJK/IMAG - BP53. 38041 Grenoble FRANCE
 http://ljk.imag.fr/membres/Jean-Guillaume.Dumas
 


 




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

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Using multiple cores with Sage under VMWare Player

2009-06-15 Thread William Stein

On Tue, Jun 9, 2009 at 4:44 AM, James Parsonpar...@hood.edu wrote:


 Here's a really dumb thing you could do.

 (1) Make a copy of sage-vmware-* to another directory.

 (2) Run both vmware's at the same time.

 That'll definitely use both cores on your computer.

 Indeed! That's what I ended up doing this afternoon. I had VMWare
 Workstation make a clone of my Sage virtual machine. For some reason,
 when I tried simply making a copy of Sage in another directory (before
 I tried Workstation), I couldn't get it to run. Whenever I tried to
 start it up a second copy, something would flash on the screen,
 vanishing before I could read it, and the notebook system would not
 run. Probably I was doing something foolish.

 Is there any direct way to share Sage worksheets between two virtual
 machines, or is it simplest to save the files from one system and load
 them into another?

There is no straightforward way to share worksheets right now between
virtual machines.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] notebook.setup() problem

2009-06-15 Thread lenient7

Hello everyone,

I am very new to the sage.

I tried to use the sage from a remote client. On that regard, I am
running the Sage  4.0.1 on OpenSUSE 11.1 64bit edition. However when I
am trying to run notebook with 'secure=True' option, it gives errors
which looks like coming from notebook.setup().

Following lines are from when I trying this process with freshly
installed sage. Any idea or hint will be highly appreciated!


lenie...@lenient7:~/bin/sage-4.0.1 ./
sage
--
| Sage Version 4.0.1, Release Date: 2009-06-06
|
| Type notebook() for the GUI, and license() for information.
|
--
The SAGE install tree may have
moved.
Regenerating Python.pyo and .pyc files that hardcode the install PATH
(please wait at
most a few
minutes)...
Do not interrupt
this.
sage: notebook.setup()
Using dsage certificates.
---
NameError Traceback (most recent call
last)

/home/lenient7/bin/sage-4.0.1/ipython console in module()

/home/lenient7/bin/sage-4.0.1/local/lib/python2.5/site-packages/sage/
server/notebook/run_notebook.py in notebook_setup(self)
 39 print Using dsage
certificates.
 40 dsage = os.path.join(DOT_SAGE,
'dsage')
--- 41 sage.dsage.all.dsage.setup
()
 42 shutil.copyfile(dsage + '/cacert.pem',
private_pem)
 43 shutil.copyfile(dsage + '/pubcert.pem',
public_pem)

NameError: global name 'sage' is not defined

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: notebook.setup() problem

2009-06-15 Thread William Stein

On Mon, Jun 15, 2009 at 5:03 PM, lenient7lenie...@gmail.com wrote:

 Hello everyone,

 I am very new to the sage.

 I tried to use the sage from a remote client. On that regard, I am
 running the Sage  4.0.1 on OpenSUSE 11.1 64bit edition. However when I
 am trying to run notebook with 'secure=True' option, it gives errors
 which looks like coming from notebook.setup().

It's completely broken.  This is a new bug in Sage-4.0, which was
introduced by factoring dsage out from the core sage library, I think
by Mike Hansen.  I've opened a blocker ticket for this:

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

I hope Mike will fix this, or if not him, then somebody. It shouldn't be hard.

In the meantime, you'll unfortunately have to wait a little, or try to
fix the problem yourself.  The fix is probably just to stick some
import statement somewhere obvious.


 Following lines are from when I trying this process with freshly
 installed sage. Any idea or hint will be highly appreciated!


 lenie...@lenient7:~/bin/sage-4.0.1 ./
 sage
 --
 | Sage Version 4.0.1, Release Date: 2009-06-06
 |
 | Type notebook() for the GUI, and license() for information.
 |
 --
 The SAGE install tree may have
 moved.
 Regenerating Python.pyo and .pyc files that hardcode the install PATH
 (please wait at
 most a few
 minutes)...
 Do not interrupt
 this.
 sage: notebook.setup()
 Using dsage certificates.
 ---
 NameError                                 Traceback (most recent call
 last)

 /home/lenient7/bin/sage-4.0.1/ipython console in module()

 /home/lenient7/bin/sage-4.0.1/local/lib/python2.5/site-packages/sage/
 server/notebook/run_notebook.py in notebook_setup(self)
     39         print Using dsage
 certificates.
     40         dsage = os.path.join(DOT_SAGE,
 'dsage')
 --- 41         sage.dsage.all.dsage.setup
 ()
     42         shutil.copyfile(dsage + '/cacert.pem',
 private_pem)
     43         shutil.copyfile(dsage + '/pubcert.pem',
 public_pem)

 NameError: global name 'sage' is not defined

 




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

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] ANN: openopt 0.24 - free numerical optimization framework

2009-06-15 Thread dmitrey

Hi all,
OpenOpt 0.24, a free Python-written numerical optimization framework
with some own solvers and connections to tens of 3rd party ones, has
been released.

BSD license allows to use it in both free opensource and commercial
closed-code software.

Currently we have ~80 unique visitors daily, 15% of the ones visit
installation webpage, and some more install it via PYPI, Debian and
Alt Linux repository, mac.softpedia.com, darwinports.com,
pythonxy.com, mloss.org.

Our homepage:
http://openopt.org

Introduction to the framework:
http://openopt.org/Foreword

All release details are here:
http://openopt.org/Changelog
or
http://forum.openopt.org/viewtopic.php?id=110

Regards,
OpenOpt developers.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Posting in sage-windows

2009-06-15 Thread Craig Citro

 My apologies for posting about the sage-windows group within the sage-
 support group but I posted 3 messages (two replies and a new topic)
 into sage-windows a couple of weeks back and they're still not showing
 up in the message lists. And I wasn't sure how else to ask for help in
 posting there.

 I'm listed as a member of that group and did get an email notification
 that some messages had been posted.

 So do I need to do anything special to post there perhaps?

 That was my mistake.  I'm really sorry for your message not getting
 posted promptly.  It should in the future.


And just for the record -- when the behavior on one of the other
groups is funky, emailing sage-support isn't a bad idea at all. :) (In
this case, it was exactly the right move to fix the problem ... and
now several of us can approve messages on sage-windows, meaning it
shoudn't happen again.)

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: notebook.setup() problem

2009-06-15 Thread lenient7

Thank you William,

I am seriously considering learning Python. In any case, it looks like
that I need to be versatile with Python to use Sage well.

On Jun 15, 11:39 am, William Stein wst...@gmail.com wrote:
 On Mon, Jun 15, 2009 at 5:03 PM, lenient7lenie...@gmail.com wrote:

  Hello everyone,

  I am very new to the sage.

  I tried to use the sage from a remote client. On that regard, I am
  running the Sage  4.0.1 on OpenSUSE 11.1 64bit edition. However when I
  am trying to run notebook with 'secure=True' option, it gives errors
  which looks like coming from notebook.setup().

 It's completely broken.  This is a new bug in Sage-4.0, which was
 introduced by factoring dsage out from the core sage library, I think
 by Mike Hansen.  I've opened a blocker ticket for this:

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

 I hope Mike will fix this, or if not him, then somebody. It shouldn't be hard.

 In the meantime, you'll unfortunately have to wait a little, or try to
 fix the problem yourself.  The fix is probably just to stick some
 import statement somewhere obvious.



  Following lines are from when I trying this process with freshly
  installed sage. Any idea or hint will be highly appreciated!

  lenie...@lenient7:~/bin/sage-4.0.1 ./
  sage
  --
  | Sage Version 4.0.1, Release Date: 2009-06-06
  |
  | Type notebook() for the GUI, and license() for information.
  |
  --
  The SAGE install tree may have
  moved.
  Regenerating Python.pyo and .pyc files that hardcode the install PATH
  (please wait at
  most a few
  minutes)...
  Do not interrupt
  this.
  sage: notebook.setup()
  Using dsage certificates.
  ---
  NameError                                 Traceback (most recent call
  last)

  /home/lenient7/bin/sage-4.0.1/ipython console in module()

  /home/lenient7/bin/sage-4.0.1/local/lib/python2.5/site-packages/sage/
  server/notebook/run_notebook.py in notebook_setup(self)
      39         print Using dsage
  certificates.
      40         dsage = os.path.join(DOT_SAGE,
  'dsage')
  --- 41         sage.dsage.all.dsage.setup
  ()
      42         shutil.copyfile(dsage + '/cacert.pem',
  private_pem)
      43         shutil.copyfile(dsage + '/pubcert.pem',
  public_pem)

  NameError: global name 'sage' is not defined

 --
 William Stein
 Associate Professor of Mathematics
 University of Washingtonhttp://wstein.org
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: notebook.setup() problem

2009-06-15 Thread William Stein

On Mon, Jun 15, 2009 at 6:48 PM, lenient7lenie...@gmail.com wrote:

 Thank you William,

 I am seriously considering learning Python. In any case, it looks like
 that I need to be versatile with Python to use Sage well.

Check out this awesome free book:

http://www.diveintopython.org/

My favorite non-free Python book is:

 http://www.amazon.com/Python-Nutshell-Alex-Martelli/dp/0596001886



 On Jun 15, 11:39 am, William Stein wst...@gmail.com wrote:
 On Mon, Jun 15, 2009 at 5:03 PM, lenient7lenie...@gmail.com wrote:

  Hello everyone,

  I am very new to the sage.

  I tried to use the sage from a remote client. On that regard, I am
  running the Sage  4.0.1 on OpenSUSE 11.1 64bit edition. However when I
  am trying to run notebook with 'secure=True' option, it gives errors
  which looks like coming from notebook.setup().

 It's completely broken.  This is a new bug in Sage-4.0, which was
 introduced by factoring dsage out from the core sage library, I think
 by Mike Hansen.  I've opened a blocker ticket for this:

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

 I hope Mike will fix this, or if not him, then somebody. It shouldn't be 
 hard.

 In the meantime, you'll unfortunately have to wait a little, or try to
 fix the problem yourself.  The fix is probably just to stick some
 import statement somewhere obvious.



  Following lines are from when I trying this process with freshly
  installed sage. Any idea or hint will be highly appreciated!

  lenie...@lenient7:~/bin/sage-4.0.1 ./
  sage
  --
  | Sage Version 4.0.1, Release Date: 2009-06-06
  |
  | Type notebook() for the GUI, and license() for information.
  |
  --
  The SAGE install tree may have
  moved.
  Regenerating Python.pyo and .pyc files that hardcode the install PATH
  (please wait at
  most a few
  minutes)...
  Do not interrupt
  this.
  sage: notebook.setup()
  Using dsage certificates.
  ---
  NameError                                 Traceback (most recent call
  last)

  /home/lenient7/bin/sage-4.0.1/ipython console in module()

  /home/lenient7/bin/sage-4.0.1/local/lib/python2.5/site-packages/sage/
  server/notebook/run_notebook.py in notebook_setup(self)
      39         print Using dsage
  certificates.
      40         dsage = os.path.join(DOT_SAGE,
  'dsage')
  --- 41         sage.dsage.all.dsage.setup
  ()
      42         shutil.copyfile(dsage + '/cacert.pem',
  private_pem)
      43         shutil.copyfile(dsage + '/pubcert.pem',
  public_pem)

  NameError: global name 'sage' is not defined

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




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

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Mac OS X 10.4 32bit G4 Support

2009-06-15 Thread gsw

On 12 Jun., 08:55, paramaniac luka...@student.ethz.ch wrote:
 After 9 hours of hard work, my brave PowerBook G4 800MHz 1GB managed

Well, imagine how hard my brave PowerBook G4 550 MHz 768MB has to
work ... and it did build all the Sage OS X 10.4 PPC G4 versions from
3.4 on. This also explains why these builds are usually a bit behind
the others.

 to compile Sage 4.0.1 :-) The result can be found 
 here:http://n.ethz.ch/student/lukasre/download/
 The process was much easier than I thought. Interestingly, Sage became

Hey, thanks for the effort! Sage is a community project, after all!

 much bigger (1.5GB) and 680MB compressed.

Normally, in a bdist all the .../spkg/standard/*.spkg files are
replaced by placeholder files, to save space.

 Now I have a question for the next release of Sage:
 Are there any specific export commands to optimize the build for a
 ppc7450 machine?


Not that I knew of --- Atlas, gmp-mpir, and some other packages seem
however to recognize the CPU quite good, and optimize accordingly.
IIRC, there once was an isue with a Sage PPC version built on a Mac
with a PPC G5 CPU, and the optimizations performed prevented Sage to
run on G3/G4 Macs.

 Regards,
 Lukas

Cheers,
gsw
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Dimensional Analysis or Unit Conversion capability?

2009-06-15 Thread Robert Dodier

On Jun 15, 4:24 am, Maurizio maurizio.gran...@gmail.com wrote:

 precisely, basic units (as meter, second, etc) are, by definition,
 terminal unums (without references); derived units (as Newton, Joule,
 etc) have a dictionary with, as keys, unums representing basic/derived
 units, and, as values, their exponents; finally, any quantity may be
 derived with the same idea.

Well, I think this is an example of an operation (and it's pretty
important to the unit conversion stuff) that could be simplified
quite a bit by exploiting Sage's capabilities instead of trying
to bolt on an existing package.

If you had a list of equations of derived units in terms of basic
units, you could immediately compute a conversion factor
for two derived units. So the question is how to get such a list.

Unit conversions are conveniently expressed by equations
like foo = bar^m * baz^n. Any such equation defines a derived
unit; basic units or other derived units might appear on the right.

To get conversions to base units, just solve all the equations
for all the derived units. (It's convenient to take logarithms
so the equations are linear.) Then you have every derived unit
expressed in terms of basic units only. When new conversions
are defined, just append the new equations and solve it again.

Symbolic operations (representing equations, solving
equations, log and exp, substitution or evaluation) make that
construction very simple. The whole business with building
a hash table or a graph or whatever is just a workaround for
the lack of symbolic operations.

best

Robert Dodier

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Notebook upload/download problems

2009-06-15 Thread JoelS

Since version 3.4 or so I haven't been able to either upload
worksheets to my Sage notebook nor download from the notebook to a
file on my computer. This problem is independent of default web
browser, and exists equally on both my Mac G4 Powerbook and intel
Macbook.

*

(1) When trying to download a worksheet from notebook:

 I get a new browser page titled Internal Server Error with this
message:
   Internal Server Error
 An error occurred rendering the requested page. More
information is available in the server log.

The server log looks like this:

2009-06-15 11:16:14-0700 [HTTPChannel,8,127.0.0.1] cd sage_notebook/
worksheets/admin/  tar -jcf /Users/shapiro/.sage/temp/
PowerBook_2.local/1373/tmp_0.sws 0
sh: line 1: /sw/bin/tar: cannot execute binary file
2009-06-15 11:16:14-0700 [HTTPChannel,8,127.0.0.1] Failed to execute
command to export worksheet:
 ...
exceptions.IOError: [Errno 2] No such file or directory: '/Users/
shapiro/.sage//temp/PowerBook_2.local/1373//tmp_0.sws'

*

(2) When attempting to upload a file (in this case: beezer-
linear.sws) to notebook from my computer, I get a new browser page
that is blank, with title Error| Sage Notebook, and the following
server log message:

2009-06-15 11:22:00-0700 [-] cd /Users/shapiro/.sage/temp/
PowerBook_2.local/1611/dir_1; tar -jxf /Users/shapiro/.sage/temp/
PowerBook_2.local/1611/dir_0/beezer-linear.sws
sh: line 1: /sw/bin/tar: cannot execute binary file



Any help on this matter would be greatly appreciated --- JoelS


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: notebook.setup() problem

2009-06-15 Thread Mike Hansen

On Mon, Jun 15, 2009 at 9:59 AM, William Steinwst...@gmail.com wrote:
 It's completely broken.  This is a new bug in Sage-4.0, which was
 introduced by factoring dsage out from the core sage library, I think
 by Mike Hansen.  I've opened a blocker ticket for this:

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

 I hope Mike will fix this, or if not him, then somebody. It shouldn't be 
 hard.

 In the meantime, you'll unfortunately have to wait a little, or try to
 fix the problem yourself.  The fix is probably just to stick some
 import statement somewhere obvious.

Patch is up at http://trac.sagemath.org/sage_trac/ticket/6299.

--Mike

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Dimensional Analysis or Unit Conversion capability?

2009-06-15 Thread Maurizio

Very interesting...

so how would be the best way to do this with symbolics in SAGE? I
think the recent switch to pynac requires the community some time to
learn how to use it.

Nonetheless, I sent an email to the author of Unum, so he could at
least point out some suggestions, if not directly help to, write some
code taking advantage of SAGE capabilities, which he may really
benefit.

Thanks for the comment

Regards

Maurizio

On 15 Giu, 20:30, Robert Dodier robert.dod...@gmail.com wrote:
 On Jun 15, 4:24 am, Maurizio maurizio.gran...@gmail.com wrote:

  precisely, basic units (as meter, second, etc) are, by definition,
  terminal unums (without references); derived units (as Newton, Joule,
  etc) have a dictionary with, as keys, unums representing basic/derived
  units, and, as values, their exponents; finally, any quantity may be
  derived with the same idea.

 Well, I think this is an example of an operation (and it's pretty
 important to the unit conversion stuff) that could be simplified
 quite a bit by exploiting Sage's capabilities instead of trying
 to bolt on an existing package.

 If you had a list of equations of derived units in terms of basic
 units, you could immediately compute a conversion factor
 for two derived units. So the question is how to get such a list.

 Unit conversions are conveniently expressed by equations
 like foo = bar^m * baz^n. Any such equation defines a derived
 unit; basic units or other derived units might appear on the right.

 To get conversions to base units, just solve all the equations
 for all the derived units. (It's convenient to take logarithms
 so the equations are linear.) Then you have every derived unit
 expressed in terms of basic units only. When new conversions
 are defined, just append the new equations and solve it again.

 Symbolic operations (representing equations, solving
 equations, log and exp, substitution or evaluation) make that
 construction very simple. The whole business with building
 a hash table or a graph or whatever is just a workaround for
 the lack of symbolic operations.

 best

 Robert Dodier
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Posting in sage-windows

2009-06-15 Thread kilucas



On Jun 15, 9:32 am, Craig Citro craigci...@gmail.com wrote:
  My apologies for posting about the sage-windows group within the sage-
  support group but I posted 3 messages (two replies and a new topic)
  into sage-windows a couple of weeks back and they're still not showing
  up in the message lists. And I wasn't sure how else to ask for help in
  posting there.

  I'm listed as a member of that group and did get an email notification
  that some messages had been posted.

  So do I need to do anything special to post there perhaps?

  That was my mistake.  I'm really sorry for your message not getting
  posted promptly.  It should in the future.

 And just for the record -- when the behavior on one of the other
 groups is funky, emailing sage-support isn't a bad idea at all. :) (In
 this case, it was exactly the right move to fix the problem ... and
 now several of us can approve messages on sage-windows, meaning it
 shoudn't happen again.)

All sounds good. Many thanks
Kevin
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] factor

2009-06-15 Thread Mikie

Is there anyway to get the factor function to factor an expression
without using QQ['x'].0?  I want just integer factors.
I have created a Twisted server using Sage to do calculations from a
form.
When I put QQ['x'].0 into the sage script I get a systax on the
period.  It does work from the command line.
Thanx
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: drawing graphs

2009-06-15 Thread mark mcclure

On Jun 15, 10:38 am, William Stein wst...@gmail.com wrote:
 On Mon, Jun 15, 2009 at 12:55 PM, Dominique
 Manchonmanc...@math.univ-bpclermont.fr wrote:

  Hello!

  I'm a newcomer into Sage and Python. When I want to draw some
  graphical representation of graphs I get problems

 Despite years of work, drawing graphs in Sage is still pretty broken.

Graph drawing works well enough for me, when I just want a quick
idea of what's going on.  If I need a well drawn graph, I just export
to Graphviz.  Graphviz is open source but I seem to recall that its
license is not Sage compatible.  It is, nonetheless, freely available.

Here, for example, is the Cayley graph of the alternating group A5:

A = AlternatingGroup(5)
G = Graph(A.cayley_graph())
s = G.graphviz_string()
f = open('graphfile.dot', 'w')
f.write(s)
f.close()

If you now open graphfile.dot in Graphviz, you should get a
an interpretable version of quite a complicated graph.

Mark McClure

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: drawing graphs

2009-06-15 Thread William Stein

On Tue, Jun 16, 2009 at 12:27 AM, mark mccluremcmcc...@unca.edu wrote:

 On Jun 15, 10:38 am, William Stein wst...@gmail.com wrote:
 On Mon, Jun 15, 2009 at 12:55 PM, Dominique
 Manchonmanc...@math.univ-bpclermont.fr wrote:

  Hello!

  I'm a newcomer into Sage and Python. When I want to draw some
  graphical representation of graphs I get problems

 Despite years of work, drawing graphs in Sage is still pretty broken.

 Graph drawing works well enough for me, when I just want a quick
 idea of what's going on.  If I need a well drawn graph, I just export
 to Graphviz.  Graphviz is open source but I seem to recall that its
 license is not Sage compatible.  It is, nonetheless, freely available.

True, but I will be happier when Sage's graph drawing is at least as
good as Graphviz's.

Who amongst you is up to the challenge?

 Here, for example, is the Cayley graph of the alternating group A5:

 A = AlternatingGroup(5)
 G = Graph(A.cayley_graph())
 s = G.graphviz_string()
 f = open('graphfile.dot', 'w')
 f.write(s)
 f.close()

 If you now open graphfile.dot in Graphviz, you should get a
 an interpretable version of quite a complicated graph.
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: factor

2009-06-15 Thread William Stein

On Mon, Jun 15, 2009 at 10:54 PM, Mikiethephantom6...@hotmail.com wrote:

 Is there anyway to get the factor function to factor an expression
 without using QQ['x'].0?  I want just integer factors.

I don't understand what you mean by integer factors?  Can you give an example?

 I have created a Twisted server using Sage to do calculations from a
 form.
 When I put QQ['x'].0 into the sage script I get a systax on the
 period.  It does work from the command line.
 Thanx
 




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

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Notebook upload/download problems

2009-06-15 Thread William Stein

On Mon, Jun 15, 2009 at 8:35 PM, JoelSjoels...@gmail.com wrote:

 Since version 3.4 or so I haven't been able to either upload
 worksheets to my Sage notebook nor download from the notebook to a
 file on my computer. This problem is independent of default web
 browser, and exists equally on both my Mac G4 Powerbook and intel
 Macbook.

 *

 (1) When trying to download a worksheet from notebook:

  I get a new browser page titled Internal Server Error with this
 message:
       Internal Server Error
         An error occurred rendering the requested page. More
 information is available in the server log.

 The server log looks like this:

 2009-06-15 11:16:14-0700 [HTTPChannel,8,127.0.0.1] cd sage_notebook/
 worksheets/admin/  tar -jcf /Users/shapiro/.sage/temp/
 PowerBook_2.local/1373/tmp_0.sws 0
 sh: line 1: /sw/bin/tar: cannot execute binary file

It looks like you have some broken version if fink installed on your computer.
Try moving /sw out of the way temporarily.

 2009-06-15 11:16:14-0700 [HTTPChannel,8,127.0.0.1] Failed to execute
 command to export worksheet:
  ...
 exceptions.IOError: [Errno 2] No such file or directory: '/Users/
 shapiro/.sage//temp/PowerBook_2.local/1373//tmp_0.sws'

 *

 (2) When attempting to upload a file (in this case: beezer-
 linear.sws) to notebook from my computer, I get a new browser page
 that is blank, with title Error| Sage Notebook, and the following
 server log message:

 2009-06-15 11:22:00-0700 [-] cd /Users/shapiro/.sage/temp/
 PowerBook_2.local/1611/dir_1; tar -jxf /Users/shapiro/.sage/temp/
 PowerBook_2.local/1611/dir_0/beezer-linear.sws
 sh: line 1: /sw/bin/tar: cannot execute binary file

 

 Any help on this matter would be greatly appreciated --- JoelS


 




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

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Notebook upload/download problems

2009-06-15 Thread JoelS

Thanks William.

That did the trick!

... JoelS

On Jun 15, 3:58 pm, William Stein wst...@gmail.com wrote:
 On Mon, Jun 15, 2009 at 8:35 PM, JoelSjoels...@gmail.com wrote:

  Since version 3.4 or so I haven't been able to either upload
  worksheets to my Sage notebook nor download from the notebook to a
  file on my computer. This problem is independent of default web
  browser, and exists equally on both my Mac G4 Powerbook and intel
  Macbook.

  *

  (1) When trying to download a worksheet from notebook:

   I get a new browser page titled Internal Server Error with this
  message:
        Internal Server Error
          An error occurred rendering the requested page. More
  information is available in the server log.

  The server log looks like this:

  2009-06-15 11:16:14-0700 [HTTPChannel,8,127.0.0.1] cd sage_notebook/
  worksheets/admin/  tar -jcf /Users/shapiro/.sage/temp/
  PowerBook_2.local/1373/tmp_0.sws 0
  sh: line 1: /sw/bin/tar: cannot execute binary file

 It looks like you have some broken version if fink installed on your computer.
 Try moving /sw out of the way temporarily.



  2009-06-15 11:16:14-0700 [HTTPChannel,8,127.0.0.1] Failed to execute
  command to export worksheet:
   ...
  exceptions.IOError: [Errno 2] No such file or directory: '/Users/
  shapiro/.sage//temp/PowerBook_2.local/1373//tmp_0.sws'

  *

  (2) When attempting to upload a file (in this case: beezer-
  linear.sws) to notebook from my computer, I get a new browser page
  that is blank, with title Error| Sage Notebook, and the following
  server log message:

  2009-06-15 11:22:00-0700 [-] cd /Users/shapiro/.sage/temp/
  PowerBook_2.local/1611/dir_1; tar -jxf /Users/shapiro/.sage/temp/
  PowerBook_2.local/1611/dir_0/beezer-linear.sws
  sh: line 1: /sw/bin/tar: cannot execute binary file

  

  Any help on this matter would be greatly appreciated --- JoelS

 --
 William Stein
 Associate Professor of Mathematics
 University of Washingtonhttp://wstein.org
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---