[sage-support] Re: from mpmath complex to sage complex

2009-11-26 Thread M. Yurko
The best way is probably to use mpmath.mpmath_to_sage(). Just note that you have to provide the desired precision as well as the number to convert. On Nov 26, 4:58 pm, Alex Ghitza wrote: > (ccing sage-support in case someone else will have this question at > some point) > > Dear Fredrik, > > It s

[sage-support] Re: Finding a maximum value of a function on an interval?

2009-11-26 Thread Marshall Hampton
Perhaps this is the kind of thing you want? sage: var('x') sage: f = -x^4 + 9*x^3 - 23*x^2 + 31*x - 15 sage: f.find_maximum_on_interval(0,6) (69.216599407272753, 4.6263272799362944) If you do sage: f.find_maximum_on_interval? you can get the documentation for that. For symbolic answers you co

[sage-support] Re: Does sage pre-evaluate expressions?

2009-11-26 Thread shaunc
Thanks -- Yann's link explained everything. Since it happened to be the first thing I tried in sage, I ascribed my surprise to it, but it turned out I hadn't understood "fromfunction" properly. Sorry about that! -- Shaun -- To post to this group, send email to sage-support@googlegroups.com To u

[sage-support] from mpmath complex to sage complex

2009-11-26 Thread Alex Ghitza
(ccing sage-support in case someone else will have this question at some point) Dear Fredrik, It seems that it is possible to convert from mpf to Sage reals seemlessly: sage: import sage.libs.mpmath.all as mpmath sage: r = mpmath.mpf('1.00193') sage: r

[sage-support] Re: Does sage pre-evaluate expressions?

2009-11-26 Thread Yann
You can find the answer here (look for fromfunction): http://dsnra.jpl.nasa.gov/software/Python/numpydoc/numpy-6.html On Nov 26, 9:45 pm, William Stein wrote: > On Wed, Nov 25, 2009 at 10:07 PM, shaunc wrote: > > Hello! > > > I am new to sage -- but an experienced python user. > > I have succes

Re: [sage-support] Does sage pre-evaluate expressions?

2009-11-26 Thread William Stein
On Wed, Nov 25, 2009 at 10:07 PM, shaunc wrote: > Hello! > > I am new to sage -- but an experienced python user. > I have successfully installed sage (except for plotting on mac 10.6 -- > but I understand that's being worked on). > > I wanted to build a vector of random numbers, and did the follow

Re: [sage-support] Re: worksheet and CSS

2009-11-26 Thread William Stein
On Thu, Nov 26, 2009 at 10:26 AM, Vincent D <20100.delecr...@gmail.com> wrote: > The answer is in the code of  sage.server.notebook.css : just need to > write a css sheet named notebook.css in the DOT_SAGE path > > The remaining (minor) problem is that this configuration applies for > all the works

[sage-support] Re: worksheet and CSS

2009-11-26 Thread Vincent D
The answer is in the code of sage.server.notebook.css : just need to write a css sheet named notebook.css in the DOT_SAGE path The remaining (minor) problem is that this configuration applies for all the worksheets ! It could be nice to have an option in each worksheet... Vincent On 26 nov, 17:

[sage-support] Re: Virtualbox Sage 4.2.1... will there be one

2009-11-26 Thread Harald Schilly
On Nov 26, 2:06 am, William Stein wrote: > You can always just install any linux into virtualbox and install Sage Additional note: There is also a tutorial available to install Sage in Wubi (Ubuntu Linux on Windows partition) http://wiki.sagemath.org/WubiGuide H -- To post to this group, send

[sage-support] Re: Digest for sage-support@googlegroups.com - 13 Messages in 6 Topics

2009-11-26 Thread Harald Schilly
On Nov 26, 6:50 am, William Stein wrote: > Here it is: I played around with williams code and rewrote the two for loops in cython. I ended up with another 2.1 x speed improvement, maybe it's possible to do even more? ;) cell1: var("x,y") f = symbolic_expression(y^2*abs(3*exp(2*pi*i*(x+i*y))*3*ex

[sage-support] worksheet and CSS

2009-11-26 Thread Vincent D
Hello, I would like to consider some HTML styles in a worksheet (principally controlling margins and fonts). For example, I would be able do define a style for definitions, another one for theorems and so on. My actual solution for this is to define python functions : {{{ sage: def formatting1(s):

[sage-support] Does sage pre-evaluate expressions?

2009-11-26 Thread shaunc
Hello! I am new to sage -- but an experienced python user. I have successfully installed sage (except for plotting on mac 10.6 -- but I understand that's being worked on). I wanted to build a vector of random numbers, and did the following: sage: import random sage: import numpy as N sage: u = r

[sage-support] No wiki in compiled sage

2009-11-26 Thread Surendran Karippadath
Hello, I am compiling sage ( 4.1.2 and 4.2.1 on 32bit Debian Stable gcc-4.3.2 and 4.2.6) I find the wiki() function at the sage: prompt raises error and no wiki -page appears. The result is the following-- sage: wiki() /home/angeli/sage-4.1.2/local/lib/python2.6/site-packages/MoinMoin/ user.py