[sage-support] Re: Debian Etch: Error trying to plot

2008-07-07 Thread Mike Hansen
Hello, In order to figure things out, I think we need to know a bit more about your install. How did you install Sage? Did you use one of the binaries or did you build from source? What processor is your computer running? --Mike On Mon, Jul 7, 2008 at 3:59 PM, Alejandro Jakubi [EMAIL

[sage-support] Re: Accessing terms in an expression

2008-07-02 Thread Mike Hansen
Hi Phil, I don't think there is an official way to get at the terms, but here is something that works: sage: var('x,y') (x, y) sage: t = x^2 + y^2 sage: type(t) class 'sage.calculus.calculus.SymbolicArithmetic' sage: t._operator built-in function add sage: t._operands [x^2, y^2] sage:

[sage-support] Re: variable number of arguments for a function

2008-06-30 Thread Mike Hansen
Hello, In Python you can use *args and **kwds in the function definition to match optional arguments and keyword arguments; args will be a tuple of the arguments and kwds will be a dictionary for the keyword arguments. For example, look at the behavior of the following function: sage: def

[sage-support] Re: group rings question

2008-06-29 Thread Mike Hansen
Hello, Sorry I didn't get in on this sooner -- I've been really busy with things this past week. Anwyays, CombinatorialAlgebra is getting a bit of an update, and the changes are on the sage-combinat patch repository. You can see a working group ring here:

[sage-support] Re: Precision Problems

2008-06-23 Thread Mike Hansen
Mike's solution is ok for the precision but doesn't work for our little example log(2+a-2), because it still says - infty and in my application it doesn't fit either. Doing log(2+a-2) instead of log(2-a-2) should work assuming that you have enough precision to avoid the cancellation problem

[sage-support] Re: Precision Problems

2008-06-20 Thread Mike Hansen
Hello, while working a little with sage I encountered some problems sage has concerning numerical precision at very small numbers. I hope I can make my point with a little example. sage: a=1e-175 sage: log(a) -402.952391273958 There are a few issues at hand here. First, you have to be

[sage-support] Re: coercion problem?

2008-06-02 Thread Mike Hansen
Hello, This is definitely not a problem with coercion -- it's a problem with the iterator for G. For example. try this: sage: z = iter(G) sage: z iterator object at 0x3c737d0 sage: z.next() [0 1] [1 0] sage: z.next() [0 1] [1 1] It takes quite a bit of time to do each .next() which makes me

[sage-support] Re: using parametric_plot for more than one function

2008-05-29 Thread Mike Hansen
Hi Andrew, You can do this by saving the plots to an object and then adding them together. sage: t = var('t') sage: p1 = parametric_plot( (s), sin(2*t)), 0, 2*pi, rgbcolor=hue(0.6) ) sage: p2 = parametric_plot( (cos(t), cos(3*t)), 0, 2*pi, rgbcolor=hue(0.3) ) sage: (p1+p2).show() One can do

[sage-support] Re: Notebook insecure by default

2008-05-26 Thread Mike Hansen
This issue came up before and is being tracked here: http://trac.sagemath.org/sage_trac/ticket/2827 --Mike On Mon, May 26, 2008 at 4:09 PM, Greg Landweber [EMAIL PROTECTED] wrote: Hello, I just noticed that as of Sage 3.0.1, the notebook has default secure=False. While that is all well and

[sage-support] Re: take Sage formulas into MSWord

2008-05-22 Thread Mike Hansen
On Thu, May 22, 2008 at 12:45 AM, roleic [EMAIL PROTECTED] wrote: I can do html(latex(sage-output)) What is the best way to import it into MSWord? I don't have Word, but maybe this might be useful: http://www.chikrii.com/ . There is no way to get latex for the input since it only makes sense

[sage-support] Re: take Sage formulas into MSWord

2008-05-22 Thread Mike Hansen
Maybe this? http://ooolatex.sourceforge.net/ --Mike On Thu, May 22, 2008 at 2:04 AM, roleic [EMAIL PROTECTED] wrote: On May 22, 9:56 am, Mike Hansen [EMAIL PROTECTED] wrote: On Thu, May 22, 2008 at 12:45 AM, roleic [EMAIL PROTECTED] wrote: I can do html(latex(sage-output)) What

[sage-support] Re: take Sage formulas into MSWord

2008-05-22 Thread Mike Hansen
With html(latex(sage-output) we get html code, right? And MSWord is among other things also a html-editor capable of reading and writing html. So if I could save the sage html code somehow then I could try whether MSWord can read and display it... Now I just tested that and of course... it

[sage-support] Re: calling SAGE from C or Mathematica

2008-05-07 Thread Mike Hansen
I think you might have an easier time getting Pythonika ( http://dkbza.org/pythonika.html ) to do what you want. --Mike On Tue, May 6, 2008 at 11:41 PM, Amir [EMAIL PROTECTED] wrote: Can I start a Sage session from C? I would need to pass commands, set and get variables, and cleanly

[sage-support] Re: parenthesis matching in notebook environment

2008-04-22 Thread Mike Hansen
Hi, Do you know a good example of an javascript text editor that does this? If you could search around, that would be most helpful. The biggest concern is probably the impact on performance; it's the same issue with things like syntax highlighting. --Mike On Tue, Apr 22, 2008 at 1:21 AM,

[sage-support] Re: [sage-devel] Re: [sage-support] PDE and Finite Element methods

2008-04-07 Thread Mike Hansen
On Mon, Apr 7, 2008 at 6:25 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Yes, I did. This is the code developed by people at Simula. It works nice, but it's quite difficult to install. I generally prefer smaller tools, if I can get the job done. Ondrej Other than size and build issues,

[sage-support] Re: code to find roots no longer works

2008-04-07 Thread Mike Hansen
Hi, The issue is that .roots() now returns tuples with the root and its multiplicity. You can see this if you look at v. You need to select the 0th entry of the tuple to raise to a power. sage: RDF = RealDoubleField() sage: R.y = PolynomialRing(RDF) sage: # Let y be x^(1/9). sage: f = y +

[sage-support] Re: GeneratorsOfGroup

2008-04-07 Thread Mike Hansen
Hi Becky, Did you have a particular group in mind? --Mike On Mon, Apr 7, 2008 at 3:19 PM, Becky [EMAIL PROTECTED] wrote: Is there a command for SAGE to write an element of a group in terms of the group's generators? -Becky --~--~-~--~~~---~--~~ To

[sage-support] Re: Getting Started Questions

2008-04-06 Thread Mike Hansen
Hi James, Hello, On Sun, Apr 6, 2008 at 1:33 PM, James Hart [EMAIL PROTECTED] wrote: How should I be formatting this tuple if I want it to plot each graph in a different color but in the same plot graph? It works when it's all the same color i.e. The idiom that Sage uses is to construct

[sage-support] Re: Genus calculation

2008-04-03 Thread Mike Hansen
Hi Erick, How do you calculate the delta invariant? (This is not my area of math.) How large of m and n do you want to work with? For example, here is some Sage code to generate all the integer partitions of 40: sage: time l = Partitions(40).list() CPU times: user 0.50 s, sys: 0.03 s, total:

[sage-support] Re: Genus calculation

2008-04-03 Thread Mike Hansen
the partitions and do it all by hand, but that's an awful pain. ~Erick On Apr 3, 5:51 pm, Mike Hansen [EMAIL PROTECTED] wrote: Hi Erick, How do you calculate the delta invariant? (This is not my area of math.) How large of m and n do you want to work with? For example, here

[sage-support] Re: feature request ...

2008-04-03 Thread Mike Hansen
Hello, sage: r = matrix(SR, 4, 4, [[21,17,6,8], [-5,-1,-6,-3], [4,4,16,2], [2,3,-4,-1]]) sage: r.exp() . This is happening since Maxima is failing to do the computation for reasons that I don't know. I suppose it wouldn't be too difficult to write our own matrix exponentiation.

[sage-support] Re: feature request ...

2008-04-02 Thread Mike Hansen
Hi Georg, There is currently support for taking the matrix exponential of a symbolic matrix already in Sage since it is using Maxima in the background. I suppose that this should be extended to other types of matrices. sage: matrix(SR, 3, 3, [[21,17,6],[-5,-1,-6],[4,4,16]]).exp() [ (13*e^16

[sage-support] Re: Problem to access C code

2008-03-30 Thread Mike Hansen
Hello, What version of Sage are you using? I tried this on my local machine and can't duplicate the error that you're getting. --Mike On Sun, Mar 30, 2008 at 12:44 PM, bourba [EMAIL PROTECTED] wrote: Hello. I would like to access external C code so I have exactly followed the example

[sage-support] Re: typesetting matrices

2008-03-29 Thread Mike Hansen
AFAIK, you can't use LaTeX packages with jsmath. It just implements the standard mathmode. --Mike On Sat, Mar 29, 2008 at 1:18 PM, Jason Grout [EMAIL PROTECTED] wrote: gerhard wrote: closely related question: I wanted to use easymat for a matrix display. jsmath seems to support it.

[sage-support] Re: random questions

2008-03-27 Thread Mike Hansen
Hello, 1. The solve wrapper of maxima does some nice stuff symbolically, but of course it can't handle everything, like sage: solve(x^5-x-12,x) [0 == x^5 - x - 12] which makes sense! But I poked around a little for a numerical approximation of solutions command and didn't find

[sage-support] Re: solve()

2008-03-24 Thread Mike Hansen
I don't know of any way to do it using solve(). What you're really wanting to do is use the Chinese Remainder Theorem. After removing redundant equations, you can do the following: sage: a = [2,3,4] sage: b = [3,4,5] sage: CRT_list(a,b) 59 sage: lcm(b) 60 That being said, I think the behavior

[sage-support] Re: MAC PC configuration problem.

2008-03-05 Thread Mike Hansen
Hi Neal, When you start up the notebook on the Mac, pass the option server='192.168.1.103' and then you should able to access it on you Windows box by going to https://192.168.1.103:8000 . Let me know if that works. --Mike On Wed, Mar 5, 2008 at 8:06 AM, Neal [EMAIL PROTECTED] wrote: I

[sage-support] Re: Spline question

2008-03-04 Thread Mike Hansen
Maybe I'm missing something, but what is your question? --Mike On Tue, Mar 4, 2008 at 12:00 PM, dean moore [EMAIL PROTECTED] wrote: Playing with splines for other reasons, I found what I beat down to the following snippet (see attached) v = [] # Will hold points

[sage-support] Re: Help with Sage install

2008-02-06 Thread Mike Hansen
Hi Jimmy, It looks like you downloaded the 10.5 (Leopard) binary when you are running OS X 10.4 (Tiger). If this is the case, then you should try downloading the binary for 10.4. --Mike On Feb 6, 2008 5:09 PM, Jimmy Crockett [EMAIL PROTECTED] wrote: I downloaded Sage and followed steps in

[sage-support] Re: Taylor series of a matrix

2008-02-02 Thread Mike Hansen
Hello, Here is an example of the underlying problem sage: a = -x/(2*x-4) sage: e = lambda e: taylor(e,x,3,4) sage: e(a) -3/2 + x - 3 - (x - 3)^2 + (x - 3)^3 - (x - 3)^4 sage: type(_) class 'sage.calculus.calculus.SymbolicArithmetic' sage: b = e(a)._maxima_(); b x-(x-3)^4+(x-3)^3-(x-3)^2-9/2

[sage-support] Re: Taylor series of a matrix

2008-02-02 Thread Mike Hansen
To easily see the coefficients of each term in the taylor polynomial? Yes, that would be the reason why in this case. --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

[sage-support] Re: Putting parentheses around -1.

2008-01-23 Thread Mike Hansen
It is due to the fact that ^ has a higher precedence than - in Python. n(-1^(1/3)) is the same as n((-1^(1/3))). --Mike On Jan 23, 2008 5:04 PM, Ted Kosan [EMAIL PROTECTED] wrote: Does anyone have any thoughts on why the following 2 code samples give different results?: #SAGE Version 2.10,

[sage-support] Re: SAGE at ISP etc

2008-01-19 Thread Mike Hansen
Hello, I happen to have lots of space on an ISP site which I administer. Is it possible to unarchive the sage package in the public_html folder and start sage with a .php script to host educational notebooks? If you have shell acess on your ISP's machine than it's probably possible.

[sage-support] Re: exponentiation bug?

2008-01-18 Thread Mike Hansen
On Jan 18, 2008 12:24 PM, Georg Grafendorfer [EMAIL PROTECTED] wrote: OK, thanks, so sage-python just refers to the sage-version of python instead of the systems own python version and nothing else !? Correct. --Mike --~--~-~--~~~---~--~~ To post to this

[sage-support] Re: Computations with Lie algebras?

2008-01-14 Thread Mike Hansen
Hi Kiran, Adding good Lie algebra support to Sage has been something on my list for awhile. I just made it out here to Berkeley and am going to be here all semester for the program at MSRI. I was that you were registered for the workshop next week. What time do you get in? We can discuss

[sage-support] Re: Symbolic computation is slow

2007-12-31 Thread Mike Hansen
Hello, Sympy provides it's own matrices. As mentioned before, there needs to be more work done with sympy in Sage so that what you tried does work. In the meantime, look at the following example: sage: import sympy sage: x = sympy.Symbol('x') sage: m = sympy.Matrix([[1,x],[x,1]]) sage: m 1 x

[sage-support] Re: Symbolic computation is slow

2007-12-27 Thread Mike Hansen
Hello, The reason why the symbolic stuff in Sage is slow is that it uses a psuedo-tty interface to talk to Maxima. There is a lot of overhead with this due to waiting, synchronization, parsing the string output, etc. One way to get the symbolic stuff to be faster is to make using Sympy since

[sage-support] Re: kernel function documentation is misleading

2007-12-26 Thread Mike Hansen
I had made this a ticket a few days ago: http://sagetrac.org/sage_trac/ticket/1587 --Mike On 12/26/07, William Stein [EMAIL PROTECTED] wrote: On Dec 26, 2007 7:35 PM, Marshall Hampton [EMAIL PROTECTED] wrote: At least in the United States, and I assume some other places as well,

[sage-support] Re: Can't find my way around Sage source code

2007-12-23 Thread Mike Hansen
Hello Bill, sage: E = EllipticCurve('5077a'); E Elliptic Curve defined by y^2 + y = x^3 - 7*x + 6 over Rational Field sage: E? Type: EllipticCurve_rational_field Base Class: class 'sage.schemes.elliptic_curves.ell_rational_field.EllipticCurve_rational_field' String Form:

[sage-support] Re: Accessing a windows installation remotely

2007-12-11 Thread Mike Hansen
One more question not related to this topic. I already use maxima some by itself. I use a package called wxmaxima or something like that, and it formats the output in a pretty way. Will sage do that? I see in the reference manual that I can tell it to give me output in latex, but it

[sage-support] Re: Is this a memory problem?

2007-12-09 Thread Mike Hansen
Hello, The actual issue was that I forgot to covert symmetrica's LONGINT type ( 22 ) over to the correct Sage type. I hadn't actually tested it with calculations that got up to numbers that big. I made a ticket for this and posted a patch: http://sagetrac.org/sage_trac/ticket/1445 It will be

[sage-support] Re: Is this a memory problem?

2007-12-09 Thread Mike Hansen
9, 11:34 pm, Mike Hansen [EMAIL PROTECTED] wrote: Hello, The actual issue was that I forgot to covert symmetrica's LONGINT type ( 22 ) over to the correct Sage type. I hadn't actually tested it with calculations that got up to numbers that big. I made a ticket for this and posted

[sage-support] Re: Questions about solve()

2007-12-08 Thread Mike Hansen
http://www.sagemath.org:9002/sage_trac/ticket/1235 should be faster. --Mike On Dec 8, 2007 12:50 PM, Ted Kosan [EMAIL PROTECTED] wrote: William wrote: As a start I've implemented find_root (and some minizing and maximizing functions) and posted a patch here:

[sage-support] Re: Weaning

2007-12-07 Thread Mike Hansen
Is there some easy way I could have figured out that m would respond to the message `apply_map'? (Or whatever messages are called in the post-Smalltalk era.) In Python, they're known as methods and they come associated with an object based on its type. To get a list of all the methods that m

[sage-support] Re: Weaning

2007-12-03 Thread Mike Hansen
Hello, 1) Taylor series of a rational function. This works: sage: cos(x).taylor(x,0,2) This doesn't: sage: x/(1+x).taylor(x,0,2) This is very confusing: sage: var('x') sage: x/(1+x).taylor(x,0,2) This is due to the fact that '.' binds tighter than '/'. For example, sage:

[sage-support] Re: Nasty bug in Calculus?

2007-11-30 Thread Mike Hansen
Hello, In Maple one typically write f:=x-x if one means a function instead of an expression. Doing something similar in SAGE makes a *lot* of sense, so I don't object inherently to the lambda notation, although the default Python syntax (lambda) is not intuitive to an ordinary math student.

[sage-support] Re: Questions about solve()

2007-11-26 Thread Mike Hansen
Hello, I've posted a patch for # -- http://sagetrac.org/sage_trac/ticket/ --Mike On Nov 26, 2007 3:34 PM, Ted Kosan [EMAIL PROTECTED] wrote: William wrote: I think one student working for two weeks could greatly enhance solve, but making it: (1) try the maxima solve, and

[sage-support] Re: [sage-newbie] curve length

2007-11-20 Thread Mike Hansen
This is ticket #987 which was fixed in 2.8.9. --Mike On Nov 20, 2007 5:37 AM, David Joyner [EMAIL PROTECTED] wrote: On Nov 20, 2007 8:12 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: As far as i know, length of curve, defined as f(x) from a to b (a = x = b) is L = integral from a

[sage-support] Re: [sage-newbie] curve length

2007-11-20 Thread Mike Hansen
Hmm... I just tested it on a newer version, and I get the incorrect answer. I'll look into it more. --Mike On Nov 20, 2007 7:03 PM, Mike Hansen [EMAIL PROTECTED] wrote: This is ticket #987 which was fixed in 2.8.9. --Mike On Nov 20, 2007 5:37 AM, David Joyner [EMAIL PROTECTED] wrote

[sage-support] Re: Does the Sage Python installation interfere with a current Python?

2007-11-12 Thread Mike Hansen
Hello Lou, All of Sage's Python stuff exists independently of the system-wide Python and shouldn't have any effect on it. In particular, if the $SAGE_ROOT directory is something like /Applications/sage, then Sage's Python will live under /Applications/sage/local. --Mike

[sage-support] Re: segment fault in Singular-- return error?

2007-11-01 Thread Mike Hansen
Both work correctly for me with sage -singular in 2.8.10. --Mike On 11/1/07, Martin Albrecht [EMAIL PROTECTED] wrote: On Thursday 01 November 2007, Ursula Whitcher wrote: (I tried to post about my problem once before, so my apologies if this comes through twice.) I'm receiving a

[sage-support] Re: bug in permutations?

2007-10-27 Thread Mike Hansen
Hello, My new(er) Permutations combinatorial class should handle things correctly. sage: MS = MatrixSpace(QQ, 2, 2) sage: A = MS([1,2,3,4]) sage: Permutations(A.rows()).list() [[(1, 2), (3, 4)], [(3, 4), (1, 2)]] sage: MS = MatrixSpace(GF(2),2,2) sage: A = MS([1,2,3,4]) sage:

[sage-support] Re: Wall time leak?

2007-10-26 Thread Mike Hansen
I don't think that anything is really going wrong. There is overhead when talking to Maxima through the pexpect interface. You should post the code you are running to see if it can be optimized (with respect to the maxima interface). --Mike

[sage-support] Re: Improper Integrals

2007-10-25 Thread Mike Hansen
If you get that error message, you can use assume to make it so that Maxima does not ask the question: sage: assume(x^2-x+1 0) sage: integrate(x/(1+x^3),x,1,infinity) (6*log(2) - sqrt(3)*pi)/18 + pi/(2*sqrt(3)) --Mike On 10/25/07, kcrisman [EMAIL PROTECTED] wrote: SAGE (via Maxima) can

[sage-support] Re: Pickling objects in Notebook

2007-10-25 Thread Mike Hansen
Hello Rishi, You can use the 'save' command as illustrated below. sage: a = matrix(2, [1,2,3,-5/2]) sage: save(a, '/home/mike/a.sobj') sage: b = load('/home/mike/a.sobj') sage: b [ 12] [ 3 -5/2] Note that the server need to have to have permission to write the file to the

[sage-support] Re: Mathematical Expression to latex-code-conversion

2007-10-24 Thread Mike Hansen
://sage.scipy.org/sage/ -~--~~~~--~~--~--~--- # HG changeset patch # User Mike Hansen [EMAIL PROTECTED] # Date 1193248166 18000 # Node ID ff6836693992d0cdf8513083904cccafb5b9bfa5 # Parent 384cf32899ac4ad7e086bbc3ca53c577d68bd3f1 Fixed #982 diff -r 384cf32899ac -r

[sage-support] Re: Fwd: SAGE 2.8.6

2007-10-12 Thread Mike Hansen
** File integer.pyx, line 1624: sage: (10).divide_knowing_divisible_by(26) # close Expected: 3846 Got: 2312678544

[sage-support] Re: bug in matrix

2007-10-11 Thread Mike Hansen
Hello, Are you running a 64-bit machine? I looked at the code, and the problem seems to come from the fact that it is doing a naive check on the type of the numpy array; it is currently assuming that your float32 array is a float64 array which is why you are getting the strange results you are.

[sage-support] Re: bug in matrix

2007-10-11 Thread Mike Hansen
from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~--- # HG changeset patch # User Mike

[sage-support] Re: Question: What's special about 994?

2007-10-10 Thread Mike Hansen
Hello, The issue is that you are passing in x^2 as a function. Since x is defined by default to be a symbolic expression, then x^2 is also a symbolic expression. Furthermore, when you apply it to a value, you also get a symbolic expression. See this: sage: g = x^2 sage: type(g) class

[sage-support] Re: Creating compiled code

2007-09-19 Thread Mike Hansen
Hello Simon, You can import the SAGE functionality you need in your module by just importing the appropriate sage modules into your .pyx file. For example, if you want to use the binomial function, just add from sage.rings.arith import binomial to the top of your .pyx file. --Mike On

[sage-support] Re: Bug: big complex numbers

2007-09-05 Thread Mike Hansen
Hello, I posted patches to fix this on http://sagetrac.org/sage_trac/ticket/587 . They should be in sage-2.8.3.3 which was released today. sage - upgrade should do the trick. --Mike On Sep 4, 12:17 pm, mabshoff [EMAIL PROTECTED] dortmund.de wrote: On Sep 4, 5:10 pm, Markus Fraczek [EMAIL

<    1   2   3   4