[sage-support] Re: Coercion problem

2009-03-21 Thread Robert Bradshaw
On Mar 21, 2009, at 9:06 AM, Jason Bandlow wrote: Hi all, Is the following missing coercion known? I couldn't find anything on trac, but there's a lot there related to coercion, so I may have missed it. sage: a = float(1.0) sage: QQ(a) TypeError: Unable to coerce

[sage-support] Re: Number of operands in an expression

2009-03-21 Thread Robert Bradshaw
On Mar 21, 2009, at 6:05 PM, William Stein wrote: On Sat, Mar 21, 2009 at 5:42 PM, Alasdair amc...@gmail.com wrote: Is pynac still being actively developed? Yes. From its web pages it seems not; anyway I would have thought that most of its functionality would have found a better and

[sage-support] Re: ImportError starting Sage 3.4 in Mac OS X 10.4.11

2009-03-21 Thread Robert Bradshaw
On Mar 21, 2009, at 7:28 PM, John G wrote: I just downloaded Sage 3.4 for Mac OSX (sage-3.4-Intel-OSX10.5-i386- Darwin.dmg). I installed it without trouble, but trying to run it I get the errors below. I'm running Mac OS X 10.4.11 on an Intel Core Duo Mac Mini. What am I doing wrong? Is

[sage-support] Re: Disabled person using SAGE

2009-03-20 Thread Robert Bradshaw
On Mar 20, 2009, at 9:21 PM, Marshall Hampton wrote: There might be a better way of doing this, but one way to get the docstrings that show up with ? is: q = globals().keys() q.sort() docstrings = [eval(x).__doc__ for x in q] It really depends on what exactly you want to do though - it

[sage-support] Re: Why does import not work?

2009-03-19 Thread Robert Bradshaw
On Mar 19, 2009, at 12:04 AM, Simon King wrote: Dear Robert, On Mar 19, 4:01 am, Robert Bradshaw rober...@math.washington.edu wrote: I would guess you have a circular import issue going on here when you try to put it in the Sage library. Unfortunately, I don't have an easy solution other

[sage-support] Re: determinants of matrix polynomials

2009-03-19 Thread Robert Bradshaw
On Mar 19, 2009, at 1:17 AM, Chris Godsil wrote: I want to compute determinants of matrix polynomials, for matrices up to 20 x 20, say. The attached transcript seems to indicate 9 or 10 might be my limit. (Or it's late and I am being stupd?) It depends on what ring you're over. sage: M =

[sage-support] Re: pylab.axis does not work any more

2009-03-17 Thread Robert Bradshaw
On Mar 17, 2009, at 3:02 PM, Luiz Felipe Martins wrote: [...] So, it is not the interface with scipy/pylab that changed, but the way literals such as 5r are interpreted by Sage. This was a known bug, and has been fixed. http://trac.sagemath.org/ sage_trac/ticket/5356 On Tue, Mar 17, 2009

[sage-support] Re: Trouble with PermutationGroupElement

2009-03-16 Thread Robert Bradshaw
On Mar 16, 2009, at 1:27 PM, epple wrote: I am slightly confused about Permutation groups. The following, I think, is part of the problem. Version: 3.4 (Sage on the web) Code: sage: h=PermutationGroupElement('()') sage: k=PermutationGroupElement('(1,2)') sage: k^2==h,h==k^2 (False, True)

[sage-support] Re: Trouble with PermutationGroupElement

2009-03-16 Thread Robert Bradshaw
On Mar 16, 2009, at 2:25 PM, epple wrote: Actually I am getting the same result for other permutations, like: sage: h=PermutationGroupElement('(1,3,2)') sage: k=PermutationGroupElement('(1,2,3),(4,5)') sage: k^2==h,h==k^2 (False, True) Hmm... looks like permutation groups aren't being

[sage-support] Re: Adding elements of different polynomial rings - how to?

2009-03-12 Thread Robert Bradshaw
On Mar 12, 2009, at 12:32 AM, Simon King wrote: Dear Supporters, the following works: sage: R=PolynomialRing(QQ,['a','x1','y1']) sage: S=PolynomialRing(QQ,['x1','y1','z']) sage: R('x1+a')+S('x1+z') a + 2*x1 + z The following does not work: sage: R=PolynomialRing(QQ,['a','x','y1'])

[sage-support] Re: Maxima not able to multiply functions with complex numbers

2009-03-11 Thread Robert Bradshaw
On Mar 11, 2009, at 4:56 AM, Mani chandra wrote: Hi, The following function gives me an error. def test(l, r): return complex(0, 1)**l*spherical_bessel_J(l, r) [...] TypeError: unsupported operand parent(s) for '*': 'type 'complex'' and 'Symbolic Ring' Help

[sage-support] Re: instructions for installing sage do not work

2009-03-11 Thread Robert Bradshaw
, Norbert On Mar 10, 9:58 pm, Robert Bradshaw rober...@math.washington.edu wrote: How are you starting up Sage? If you're starting up sage via /path/into/folder/sage then you'll have to do /path/into/folder/sage -b On Mar 10, 2009, at 8:52 PM, nsauer wrote: Thanks for the help. I

[sage-support] Re: coercion bug?

2009-03-11 Thread Robert Bradshaw
On Mar 11, 2009, at 3:50 PM, Carl Witty wrote: On Mar 11, 2:55 pm, Alex Raichev tortoise.s...@gmail.com wrote: Well, I think I can explain what's happening. There's a coercion from arbitrary polynomials into the Symbolic Ring; this is useful, because it lets you deal with polynomials

[sage-support] Re: instructions for installing sage do not work

2009-03-10 Thread Robert Bradshaw
How are you starting up Sage? If you're starting up sage via /path/into/folder/sage then you'll have to do /path/into/folder/sage -b On Mar 10, 2009, at 8:52 PM, nsauer wrote: Thanks for the help. I made the changes but failed to recompile. Here is what I did: (test is my home name)

[sage-support] Re: coercion bug?

2009-03-10 Thread Robert Bradshaw
On Mar 10, 2009, at 8:57 PM, Carl Witty wrote: On Mar 10, 6:47 pm, Alex Raichev tortoise.s...@gmail.com wrote: Does anyone know what's up with this weird error? Sage can multiply a symbolic variable and a constant of a polynomial ring R but not a symbolic variable and an element of

[sage-support] Re: symbolic matrix multiplication in sage

2009-03-09 Thread Robert Bradshaw
On Mar 9, 2009, at 4:44 AM, David Joyner wrote: On Sun, Mar 8, 2009 at 1:43 PM, alex alessandro.bernardini.1...@gmail.com wrote: How can i compute the matrix multiplication (product) of two symbolic matrices in sage ? I have tried: A = maxima(matrix ([a, b], [c, d])) AI= A.invert()

[sage-support] Re: How to inherit from extension classes?

2009-03-07 Thread Robert Bradshaw
On Mar 7, 2009, at 12:10 AM, Simon King wrote: Hi! I would like to create an extension class that inherits from CommutativeRingElement. In order to learn how it works, I looked at the file sage/rings/polynomial/multi_polynomial.pyx and ...pxd However, the whole story fails at a *very*

[sage-support] Re: how to plot points from xml

2009-03-04 Thread Robert Bradshaw
On Mar 4, 2009, at 7:59 PM, compound eye wrote: Hello, I've got lots of data as numbers in xml files, which I would like to be able to plot I've just started using sage today, and was wondering if someone could please point me to an example of how to make a list of 2d point and how to

[sage-support] Re: Complex number and TypeError: 'float' object is not callable

2009-03-02 Thread Robert Bradshaw
On Mar 2, 2009, at 3:09 AM, Alasdair wrote: Thanks - being a beginner I thought that c.imag() was the only allowable syntax; I didn't know c.imag was allowed. It's not in general, only for the Python complex type. - Robert --~--~-~--~~~---~--~~ To post to

[sage-support] Re: Complex number and TypeError: 'float' object is not callable

2009-03-01 Thread Robert Bradshaw
On Mar 1, 2009, at 4:09 AM, Alasdair wrote: Here's the error: c=complex((sqrt(3)+2*I)^4) imag(c) returns TypeError: 'float' object is not callable So - how do I obtain the imaginary part of c? c.imag Our imag() function should really know about Python complex variables... - Robert

[sage-support] Re: numerical_sqrt?

2009-02-28 Thread Robert Bradshaw
It's from the days before sqrt accepted a precision parameter. Should almost certainly be deprecated. Also, one has the oddness that sage: numerical_sqrt(3) sqrt(3) http://trac.sagemath.org/sage_trac/ticket/5404 - Robert On Feb 28, 2009, at 1:06 AM, Rolandb wrote: Hi, what is the use of

[sage-support] Re: Request

2009-02-27 Thread Robert Bradshaw
On Feb 27, 2009, at 11:13 AM, Santanu Sarkar wrote: Can any one give me implementation of LLL algorithm in C/C++ Language? All the source code used in Sage is open source, you can download it and look around. Specifically, all .spkg files are bzipped tars and can be unpacked. Both pari

[sage-support] Re: Inverse laplace transform and Post integration formula - symbolic derivative?

2009-02-26 Thread Robert Bradshaw
On Feb 26, 2009, at 2:49 AM, Maurizio wrote: Hi all, what do you think about the inverse_laplace() now present in SAGE? I am not very satisfied, I am not able to derive the results for even simple functions. It is a simple wrapper around the maxima inverse laplace function. What I'd

[sage-support] Re: Data from mysql

2009-02-25 Thread Robert Bradshaw
Yes--you can install any Python package that interacts with MySQL right in Sage's Python environment. Just type sage -sh first and then install it (via setup.py or easy_install) just as you would in any other Python environment. Then you can import it and use it from all your scripts. -

[sage-support] Re: Plot some function F(variable, constant)

2009-02-21 Thread Robert Bradshaw
On Feb 21, 2009, at 7:24 AM, hpon wrote: Here it is.. I'm totally new to this, so feel free to comment on my code in general. [...] #Function Moment_ def Moment(sln, mu_): eqns = [sln[0], mu == mu_, a == 255, a_1 == 155, a_4 == 200, theta == pi/9, l

[sage-support] Re: Automatically displaying the type of an object?

2009-02-17 Thread Robert Bradshaw
On Feb 17, 2009, at 6:57 PM, Alasdair wrote: Yes, you can certainly turn on the behaviour in Sage by writing your last line as a function: def parent_on(): ipapi.get().set_hook(result_display, repr_and_parent) However, I still haven't worked out how to write the corresponding

[sage-support] Re: spherical_bessel_J() argument

2009-02-17 Thread Robert Bradshaw
On Jan 29, 2009, at 11:51 AM, Robert Close wrote: I'm trying to do some symbolic calculus and am having trouble with the special function spherical_bessel_J(). I can't get it to work when the argument contains two factors. Here is a simple program: k=var('k'); k=maxima(k);

[sage-support] Re: Automatically displaying the type of an object?

2009-02-17 Thread Robert Bradshaw
On Feb 17, 2009, at 8:14 PM, Alasdair wrote: I have tried def parent_off(): ipapi.get().set_hook(result_display, IPython.hooks.result_display) but it does nothing - the parent is still printed. I bet IPython.hooks.result_display is what gets changed... you'd need to cache the

[sage-support] Re: Automatically displaying the type of an object?

2009-02-17 Thread Robert Bradshaw
On Feb 17, 2009, at 11:12 PM, Alasdair wrote: On Feb 18, 3:59 pm, Robert Bradshaw rober...@math.washington.edu wrote: I bet IPython.hooks.result_display is what gets changed... you'd need to cache the original before changing it with parent_on. That makes sense - but how do I cache

[sage-support] Re: Trouble with interfaces

2009-02-10 Thread Robert Bradshaw
On Feb 9, 2009, at 11:03 PM, clinton bowen wrote: Okay, I have matlab and mathematica on my computer. How exactly does one use the sage interface? I know the interfaces need this PATH, but how does one edit this PATH? I'm about 5 days old with sage, little python programming. What kind of

[sage-support] Re: Iterators in compiled code?

2009-02-07 Thread Robert Bradshaw
On Feb 6, 2009, at 7:18 PM, kcrisman wrote: Depending on what you're doing with the permutations, all your time may be spent elsewhere, and compiling your snippet may not help. Specifically, if you don't cdef anything I'd be surprised to see a big speedup, but if you cimport permutation

[sage-support] Re: Iterators in compiled code?

2009-02-07 Thread Robert Bradshaw
On Feb 7, 2009, at 1:41 AM, Simon King wrote: Dear Robert, On 7 Feb., 04:18, kcrisman kcris...@gmail.com wrote: Could you be more specific (e.g. give a toy example of how to cimport Permutations(n) and then use it to do something trivial, for someone who is still very new at using

[sage-support] Re: Solving a 2nd order linear ODE with initial conditions

2009-02-06 Thread Robert Bradshaw
On Feb 1, 2009, at 3:42 PM, David Joyner wrote: On Sun, Feb 1, 2009 at 5:34 PM, Christophe Deroulers christophe.deroulers__ggsa...@normalesup.org wrote: When one looks at what Sage sends to Maxima when desolve(diff(y,x, 2)+y(x)==0,y,[0,3,2]) is called, it turns out that Maxima receives

[sage-support] Re: Iterators in compiled code?

2009-02-06 Thread Robert Bradshaw
On Jan 31, 2009, at 3:23 AM, Alasdair wrote: Well I tried v = iter(Permutations(range(n))) and the code compiled fine - but still ran slow. To test the Petersen graph (10 vertices), the compiled code took a wall time of 524.23 s, and the uncompiled code, using v=(p for p in

[sage-support] Re: unsupported operand parent(s) for *

2009-01-27 Thread Robert Bradshaw
= DirichletGroup(75) sage: chi = list(G)[8] sage: K = G.base_ring() sage: R.x = PolynomialRing(K) sage: L.alpha = K.extension(x^2 - 11) sage: chi(2) * alpha zeta20^4*alpha Here alpha = sqrt(11). Someday Robert Bradshaw is likely to make your original chi(2)*sqrt(11) work. We'll see. This would

[sage-support] Re: unsupported operand parent(s) for *

2009-01-27 Thread Robert Bradshaw
On Jan 27, 2009, at 4:02 PM, William Stein wrote: On Tue, Jan 27, 2009 at 1:51 PM, Robert Bradshaw rober...@math.washington.edu wrote: On Jan 27, 2009, at 12:54 AM, William Stein wrote: On Tue, Jan 27, 2009 at 12:45 AM, alia hamieh aliasham...@gmail.com wrote: I'm trying to deal

[sage-support] Re: [sage-edu] sage mailing lists

2009-01-27 Thread Robert Bradshaw
On Jan 27, 2009, at 3:12 PM, calcp...@aol.com wrote: In a message dated 1/27/2009 2:38:49 A.M. Eastern Standard Time, wst...@gmail.com writes: This discussion should be on sage-nt, the list for sage number theory discussion: Oh, I did not know of this list! How do I get a list of all

[sage-support] Re: functions in list comprehensions

2009-01-23 Thread Robert Bradshaw
On Jan 23, 2009, at 11:37 AM, Carl Witty wrote: It's clear that the present situation is not ideal. I doubt if pynac symbolics will fix all your problems (for instance, if your car makes a funny noise whenever you go over 50mph, I don't think pynac symbolics will help). Since I don't know

[sage-support] Re: functions in list comprehensions

2009-01-23 Thread Robert Bradshaw
On Jan 23, 2009, at 9:04 AM, kcrisman wrote: Sorry to focus on one little question and ignore the big picture, but it's 6:15am :-) Yes - my first question was at 1:30 AM, so I hear you! This will be better in the new symbolics: sage: x,y = var('x,y',ns=1) sage: f = x^2 + y^2 -1

[sage-support] Re: Using jmol without the java applet in a worksheet.

2009-01-23 Thread Robert Bradshaw
On Jan 23, 2009, at 11:06 AM, adrian wrote: Is there a way in a worksheet to display a 3d plot using jmol without the applet; i.e., not embedded, but using the usual java; as it does if one used the terminal. You can set sage.plot.plot.EMBEDDED_MODE = False, but that might have other side

[sage-support] Re: functions in list comprehensions

2009-01-23 Thread Robert Bradshaw
On Jan 23, 2009, at 2:04 PM, Carl Witty wrote: On Jan 23, 1:43 pm, Robert Bradshaw rober...@math.washington.edu wrote: 3) I'm (still!) rewriting fast_float; one of the goals of the eventual rewrite is to have a mode that uses Sage objects instead of floating- point numbers (of course

[sage-support] Re: functions in list comprehensions

2009-01-23 Thread Robert Bradshaw
On Jan 23, 2009, at 4:15 PM, Carl Witty wrote: On Jan 23, 2:18 pm, Robert Bradshaw rober...@math.washington.edu wrote: One thought I had was that support for a wide variety of types could be done by manipulating function pointers. This would make it easy to give support for a wide variety

[sage-support] Re: functions in list comprehensions

2009-01-22 Thread Robert Bradshaw
On Jan 22, 2009, at 10:25 PM, kcrisman wrote: In 3.3.alpha0, the following works fine: sage: list= [[i,j] for i in [-3..3] for j in [-3..3]] sage: [coords for coords in list if (coords[0])^2+(coords[1])^2-1==0] [[-1, 0], [0, -1], [0, 1], [1, 0]] The following doesn't terminate in a

[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Robert Bradshaw
On Jan 19, 2009, at 1:34 PM, Skylar wrote: Hello, I have been annoying the good folks of #sage-devel hoping to hack together a way to make notebook() run but be able to retrieve just 1 cell of a worksheet for insertion into another webpage. Does anyone have a quick hack that I can use

[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Robert Bradshaw
On Jan 19, 2009, at 4:27 PM, Skylar wrote: Yes, I am starting to understand how I can use that. What are the sleep(0.5), sleep(1)'s there for? I know that they delay execution. I don't know exactly what that means and why it would be useful in the code in that docstring. The sleeps are

[sage-support] Re: Minimal notebook - just 1 cell

2009-01-19 Thread Robert Bradshaw
On Jan 19, 2009, at 4:39 PM, Skylar wrote: I was rather hoping to keep all of the great js/css and everything having to do with the cell like the tab completion and the way that the input and output are handled - all are fantastic in the notebook. I was just hoping that I could send a single

[sage-support] Re: How to show() without simplify()?

2009-01-17 Thread Robert Bradshaw
On Jan 17, 2009, at 10:18 AM, Hinnerk wrote: On 15 Jan., 21:00, Robert Bradshaw rober...@math.washington.edu wrote: The simplified form is cached, so you can use this to fool it into thinking it's already simplified. sage: f = q + 1 + q sage: f._simp = f sage: f q + 1 + q thank you

[sage-support] Re: confusing output? latex(7-(-1)^(1/3))

2009-01-17 Thread Robert Bradshaw
On Jan 17, 2009, at 4:00 PM, William Stein wrote: On Sat, Jan 17, 2009 at 3:01 PM, Jason Grout jason-s...@creativetrax.com wrote: William Stein wrote: This bug that you reported is now http://trac.sagemath.org/sage_trac/ticket/5004 This bug came up a while ago on the mailing list

[sage-support] Re: Where is the is_strongly_connected for DiGraph ?

2009-01-16 Thread Robert Bradshaw
On Jan 16, 2009, at 12:34 AM, Vincent D wrote: Hello, I'm working on directed graphs. So sage : G = DiGraph() ... and I want to know if my graph G is strongly connected. There is such a method in networkx but it seems that this features disappear in SAGE (?). Moreover, there is a

[sage-support] Re: SAGE server

2009-01-16 Thread Robert Bradshaw
Nathan, I'm sorry to hear of your frustration. We've tried to make it easy, in fact everyone who uses Sage via the notebook interface starts up a Sage server. The issue here is that giving someone a Sage notebook account is basically giving them shell access--something you wouldn't want

[sage-support] Re: How to show() without simplify()?

2009-01-15 Thread Robert Bradshaw
The simplified form is cached, so you can use this to fool it into thinking it's already simplified. sage: f = q + 1 + q sage: f._simp = f sage: f q + 1 + q - Robert On Jan 15, 2009, at 6:23 AM, Hinnerk wrote: Hello, I'm trying to plot a quite complex formular. Since the plot does look

[sage-support] Re: backward compatibility for notebooks

2009-01-14 Thread Robert Bradshaw
On Jan 14, 2009, at 12:20 AM, Vincent D wrote: Hi, I have a sage-server running but I want to try the new sage version (my old one is 3.1.4) with a lot of precious worksheets (...). Is there anything to do to ensure compatibility ? Thanks, Vincent You can try uploading the worksheets

[sage-support] Re: lost connection to maxima

2009-01-13 Thread Robert Bradshaw
On Jan 13, 2009, at 11:39 AM, ma...@mendelu.cz wrote: Many thanks, memory seems to be a big problem on my server (I did tests you suggested on my laptop and each worksheet is consumig a lot of memory). I have seen that sagenb.org has 2GB memory - like my PC. How many users wirk

[sage-support] Re: the set containing the empty set

2009-01-10 Thread Robert Bradshaw
On Jan 9, 2009, at 9:21 PM, John H Palmieri wrote: On Jan 9, 7:03 pm, William Stein wst...@gmail.com wrote: On Fri, Jan 9, 2009 at 6:42 PM, John H Palmieri jhpalmier...@gmail.com wrote: Here's another question: what is the most efficient way of testing whether one Set is a subset of

[sage-support] Re: Coercion vs. Conversion

2009-01-05 Thread Robert Bradshaw
On Jan 4, 2009, at 11:47 AM, ggrafendorfer wrote: Hi Robert, thanks for your answer, I not sure if I know the difference between coercion and conversion, could you explain it to me? A coercion is implicit and happens, for example, when you do arithmetic. sage: 1 + 1/2# 1 is coerced

[sage-support] Re: How to make Sage to solve the equation?

2009-01-03 Thread Robert Bradshaw
On Jan 3, 2009, at 4:10 PM, calcp...@aol.com wrote: sage: plot(x^2*log(x,2)-1, 0,2) [nice plot so you can understand what is going on] sage: find_root(x^2*log(x,2)-1,1, 2) 1.4142135623730951 Hi, I'm trying out SAGE for the first time, so I entered what you suggested (see above). Now,

[sage-support] Re: Type error

2008-12-19 Thread Robert Bradshaw
On Dec 19, 2008, at 10:40 AM, Jason Grout wrote: Marshall Hampton wrote: Something odd is happening here. I just noticed that if we define v as: v = vector(QQ,[1,1]) then there are no problems, even though the type(v) is the same as in your code. I don't understand how the same type of

[sage-support] Re: SAGE equivalent to Matlab vectorized functions

2008-12-18 Thread Robert Bradshaw
It should be noted that often the easiest way to get Python with all those modules is to install Sage :). - Robert On Dec 18, 2008, at 2:46 AM, Fernando wrote: Harald, Probably I should start as you suggested installing basic python and the modules that you list. Thanks for your

[sage-support] Re: Two questions concerning solve

2008-12-17 Thread Robert Bradshaw
On Dec 17, 2008, at 11:49 AM, David Joyner wrote: On Wed, Dec 17, 2008 at 2:41 PM, Simon King k...@mathematik.uni- jena.de wrote: Dear Sage supporters, inspired by http://groups.google.com/group/sage-support/ browse_thread/thread/729f4a557d970195?hl=en, I was playing around with the

[sage-support] Re: Change to a local variable affects the variable outside the program

2008-12-16 Thread Robert Bradshaw
On Dec 15, 2008, at 12:53 PM, Simon King wrote: Dear Lars, dear Robert, The explanation is hidden in a footnote in the tutorial. Please see Defining Functions in More Control Flow Tools in the Python Tutorial:http://docs.python.org/tutorial/controlflow.html#defining- functions That part

[sage-support] Re: sage ecm-interface

2008-12-16 Thread Robert Bradshaw
On Dec 16, 2008, at 7:47 AM, mabshoff wrote: On Dec 16, 7:44 am, William Stein wst...@gmail.com wrote: SNIP I posted a patch there that does some error checking at least. It's minimal. I hope somebody will referee it asap so it can go in sage-3.2.2. The real longterm solution to this

[sage-support] Re: polygen vs. inject_variables

2008-12-06 Thread Robert Bradshaw
I think you are misinterpreting polygen. Polygen takes as input a ring, and creates a new polynomial ring over that rings, and returns the generator of that new ring (not the generator of the original ring). Also, since you didn't provide a name to the polygen function, it defaults to x.

[sage-support] Re: polygen vs. inject_variables

2008-12-06 Thread Robert Bradshaw
, john_perry_usm wrote: Robert, Okay, I see the difference: a polynomial generator over the ring means something that will generate a ring over the given ring, not a polynomial generator of the ring. thanks john perry On Dec 6, 12:31 pm, Robert Bradshaw [EMAIL PROTECTED] wrote: I think

[sage-support] Re: Passing python functions?

2008-12-06 Thread Robert Bradshaw
On Dec 6, 2008, at 9:48 PM, Tim Lahey wrote: Hi, This is more of a python question than a Sage one, but I kind of need to figure this out for the integral test suite. I'd like to pass the name of a function into another function in order to carry out the comparison. This may change

[sage-support] Re: Setting symbol for imaginary unit?

2008-12-04 Thread Robert Bradshaw
On Dec 4, 2008, at 2:22 PM, Tim Lahey wrote: On Dec 4, 2008, at 5:18 PM, William Stein wrote: This is probably off topic, but you can always get any Sage global variable you're used to by doing sage.all.varname. For example: sage: I = 5 sage: I 5 sage: sage.all.I I Good to know.

[sage-support] Re: divisors sorted

2008-12-04 Thread Robert Bradshaw
On Dec 4, 2008, at 9:35 PM, pong wrote: In SAGE 3.2.1 , the docstring of divisors says: Definition: divisors(n) Docstring: Returns a list of all positive integer divisors of the nonzero integer n. A second parameter may be passed to surpress sorting of

[sage-support] Re: divisors sorted

2008-12-04 Thread Robert Bradshaw
On Dec 4, 2008, at 10:31 PM, pong wrote: Robert, thanks for clearing that up for me. However, I think it's still desirable to leave unsorted as an option, even though as you said now sorting doesn't take up the majority of the time. For example, it will be a waste of computing time if

[sage-support] Re: First use of SAGE, eigen* and maxima compute time

2008-12-04 Thread Robert Bradshaw
On Dec 4, 2008, at 10:51 PM, Jan Groenewald wrote: Hi, On Thu, Dec 04, 2008 at 02:47:22AM -0800, Mike Hansen wrote: I don't have a whole lot of time, but I put some improvements up at http://sagenb.org:8000/home/pub/94/ and included some timings there. h6.eigenvalues() took 0.11 seconds to

[sage-support] Re: bug in numerical_integral?

2008-12-03 Thread Robert Bradshaw
On Dec 3, 2008, at 12:46 AM, Stan Schymanski wrote: There seems to be a bug in numerical_integral in sage 3.2: -- | Sage Version 3.2, Release Date: 2008-11-20 | | Type notebook() for the GUI, and

[sage-support] Re: passing arguments to python functions in numerical_integral, plot etc.

2008-12-03 Thread Robert Bradshaw
On Dec 3, 2008, at 5:55 AM, Stan Schymanski wrote: Dear all, Could anyone tell me how to controll the order in which arguments are evaluated when they are passed to python functions? It seems that the functions are evaluated first and then the variables are substituted, which leads to

[sage-support] Re: sage and tkinter?

2008-12-03 Thread Robert Bradshaw
On Dec 3, 2008, at 7:48 AM, David Joyner wrote: System wide, it works fine: [EMAIL PROTECTED]:~/sagefiles/sage-3.2.rc0$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type help, copyright, credits or license for more information.

[sage-support] Re: questions about types.

2008-12-03 Thread Robert Bradshaw
On Dec 3, 2008, at 10:28 AM, adrian wrote: In the following code: sage: x=CC['x'].gen() sage: type(x) class 'sage.rings.polynomial.polynomial_element_generic.Polynomial_generic_d ense_field' sage: f(x)=sin(x) sage: type(x) class 'sage.calculus.calculus.SymbolicVariable' Is this

[sage-support] Re: sage and tkinter?

2008-12-03 Thread Robert Bradshaw
On Dec 3, 2008, at 10:48 AM, David Joyner wrote: But tcl/tk is not a python package. tkinter is the python interface to it and it is included with every python distribution (including Sage's). The problem is that to import it, tkinter.py looks for tcl/tk using some magic I couldn't

[sage-support] Re: A limit question.

2008-12-03 Thread Robert Bradshaw
On Dec 3, 2008, at 10:33 AM, adrian wrote: sage: limit(x*0,x=oo) 0 sage: limit(x*oo,x=0) 0 This seems wrong to me; and probably the problem is that x*oo should not be allowed to begin with... sage: x*oo (+Infinity)*x Yeah, that is worrisome... - Robert

[sage-support] Re: passing arguments to python functions in numerical_integral, plot etc.

2008-12-03 Thread Robert Bradshaw
On Dec 3, 2008, at 10:42 AM, Jason Grout wrote: Robert Bradshaw wrote: On Dec 3, 2008, at 5:55 AM, Stan Schymanski wrote: Dear all, Could anyone tell me how to controll the order in which arguments are evaluated when they are passed to python functions? It seems that the functions

[sage-support] Re: f(x)=abs(x); f(vector([1,2,3])) gives error

2008-12-03 Thread Robert Bradshaw
On Dec 2, 2008, at 2:10 PM, Scott Walck wrote: Hello, Is there a reason why I cannot do f(x)=abs(x) f(vector([1,2,3])) Many related things work fine: abs(vector([1,2,3])) # works def f(x): return abs(x) f(vector([1,2,3])) # works Session below shows the trouble. [...]

[sage-support] Re: passing arguments to python functions in numerical_integral, plot etc.

2008-12-03 Thread Robert Bradshaw
On Dec 3, 2008, at 7:54 PM, Jason Grout wrote: Robert Bradshaw wrote: Another way to do it might be to have classes like Integrate (as opposed to functions), that represent an integral. I'm not a fan of making such a distinction based on the capitalization of the first letter

[sage-support] Re: passing arguments to python functions in numerical_integral, plot etc.

2008-12-03 Thread Robert Bradshaw
On Dec 3, 2008, at 7:38 PM, Jason Grout wrote: Robert Bradshaw wrote: On Dec 3, 2008, at 10:42 AM, Jason Grout wrote: So, bringing up an issue that has come up before, there is no way to do the equivalent of the Hold or HoldAll commands in Mma? See http://reference.wolfram.com

[sage-support] Re: Doc-testing cdef'd methods

2008-12-02 Thread Robert Bradshaw
On Dec 1, 2008, at 10:52 AM, Craig Citro wrote: Question for all: is there a good reason for writing cdef functions? Or should we make all cython functions cpdef? Python convention seems to be to expose the internals of the class, but just mark (with _ or __) the functions that are

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Robert Bradshaw
On Dec 2, 2008, at 5:40 PM, ggrafendorfer wrote: Hi Michael, You are using CDF == Complex Double Field, so numerical noise is to be expected. IEEE arithmetic might be fast, but you pay for that speed with imprecise results. It might be possible to compile without optimization and get a

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Robert Bradshaw
On Dec 2, 2008, at 6:04 PM, ggrafendorfer wrote: Perhaps we should special case for (small) integer powers, but that would slow other stuff down. What's happening here is that the symbolic expression i^2 is getting turned into CDF(i)^CDF(2). Simplification happens on printing, not on

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Robert Bradshaw
On Dec 2, 2008, at 6:12 PM, ggrafendorfer wrote: Hi Robert symbolic expression i^2 is getting turned into CDF(i)^CDF(2). the i^2 should also be of type CDF, but sage: type(i^2) class 'sage.calculus.calculus.SymbolicArithmetic' Ah, I think I see the misunderstanding now. i^2 should not be

[sage-support] Re: question about the imaginary unit i ..

2008-12-02 Thread Robert Bradshaw
On Dec 2, 2008, at 6:27 PM, ggrafendorfer wrote: Hi Robert, Again, if I want performance I could use i^2., Um... that's *slower*, right? I really did not expect that i^2. is slower than i^2, in my problem I needed performance, for this I wrote i = CDF(I) in the first line of my script,

[sage-support] Re: prevent complex numbers ?

2008-12-01 Thread Robert Bradshaw
- 2*cz) sage: assume(czys,czzr) sage: omgo.factor() (zr + sqrt(cz - ys)*sqrt(cz - zr) - cz)/(zr - cz) sage: omgo.simplify_full().real() (zr - sqrt(cz - ys)*sqrt(cz - zr) - cz)/(zr - cz) On Nov 28, 9:14 am, Robert Bradshaw [EMAIL PROTECTED] wrote: On Nov 27, 2008, at 6:58 AM, [EMAIL

[sage-support] Re: Doc-testing cdef'd methods

2008-11-29 Thread Robert Bradshaw
On Nov 29, 2008, at 9:01 AM, Simon King wrote: Dear Sage supporters, sorry if this is the wrong list. I have some cdefined methods of an extension class. How can I doc-test them? In more detail, having the following method definition of an extension class MTX, the doc test would fail

[sage-support] Re: hardware factors that affects the speed of running SAGE

2008-11-29 Thread Robert Bradshaw
On Nov 29, 2008, at 7:35 AM, pong wrote: Hi, I wonder if SAGE is optimized for multi-core CUPs (people told me that many programs don't). Sage has many components. Some of them can take advantage of multiple cores, but there's still a lot of work to do in that direction. There is

[sage-support] Re: hardware factors that affects the speed of running SAGE

2008-11-29 Thread Robert Bradshaw
On Nov 29, 2008, at 11:26 AM, Justin C. Walker wrote: On Nov 29, 2008, at 07:35 , pong wrote: Hi, I wonder if SAGE is optimized for multi-core CUPs (people told me that many programs don't). This is not an easy question to answer. Sage is built from many components that were not

[sage-support] Re: hardware factors that affects the speed of running SAGE

2008-11-29 Thread Robert Bradshaw
On Nov 29, 2008, at 11:47 AM, mabshoff wrote: On Nov 29, 11:37 am, Robert Bradshaw [EMAIL PROTECTED] wrote: On Nov 29, 2008, at 07:35 , pong wrote: Hi, I wonder if SAGE is optimized for multi-core CUPs (people told me that many programs don't). This is not an easy question

[sage-support] Re: notebook password

2008-11-28 Thread Robert Bradshaw
On Nov 27, 2008, at 7:43 AM, Bob Wonderly wrote: I use Sage via the notebook() feature. As advertised it opens the notebooks in my default browser. But I want to use a non-default browser so sent it to the link http://localhost:8000/ per instructions. It won't let me open any one of my

[sage-support] Re: Error when launching Sage

2008-11-28 Thread Robert Bradshaw
On Nov 27, 2008, at 11:40 PM, mabshoff wrote: On Nov 27, 11:30 pm, Jeffrey Straszheim [EMAIL PROTECTED] wrote: Hi Jeffrey, I've just downloaded and launched Sage on an Ubuntu 8.10 box. I unzipped the file and ran ./sage and got this: WARNING! This Sage install was built on a

[sage-support] Re: prevent complex numbers ?

2008-11-28 Thread Robert Bradshaw
On Nov 27, 2008, at 6:58 AM, [EMAIL PROTECTED] wrote: Hello, the example below shows that a complex number ( i think the I stands for it ? ) appears by doing a simplify_full. Is there a way to prevent this and to get output in real number format? sage: var('omgo zr ys cz') sage: eqomgo =

[sage-support] Re: QQbar bug

2008-11-28 Thread Robert Bradshaw
On Nov 28, 2008, at 4:15 AM, John Cremona wrote: On Nov 26, 8:31 pm, Robert Bradshaw [EMAIL PROTECTED] wrote: On Nov 26, 2008, at 3:30 AM, Simon King wrote: Dear Michael, On Nov 26, 11:34 am, mabshoff [EMAIL PROTECTED] dortmund.de wrote: please open a ticket. I would guess as you

[sage-support] Re: Error when launching Sage

2008-11-27 Thread Robert Bradshaw
On Nov 27, 2008, at 11:30 PM, Jeffrey Straszheim wrote: I've just downloaded and launched Sage on an Ubuntu 8.10 box. I unzipped the file and ran ./sage and got this: WARNING! This Sage install was built on a machine that supports instructions that are not available on this computer.

[sage-support] Re: QQbar bug

2008-11-26 Thread Robert Bradshaw
On Nov 26, 2008, at 2:30 AM, Simon King wrote: Hi! On Nov 26, 1:51 am, Alex Raichev [EMAIL PROTECTED] wrote: sage: F.a= NumberField(x^2-2) sage: a^2 2 sage: a^2 in QQ True sage: a^2 in QQbar False sage: 2 in QQbar True A related observation: sage: F.a=NumberField(x^2-2) sage:

[sage-support] Re: Open Source webMathematica?

2008-11-26 Thread Robert Bradshaw
On Nov 26, 2008, at 9:10 AM, Jason Grout wrote: heebie wrote: Hi, Thanks a lot for your help. I just have a few questions, if you wouldn't mind. 1) Can I just send the http requests to sagenb.org, or will I have to host the notebook myself? I don't know; I haven't used that http

[sage-support] Re: using the solutions of an equation

2008-11-26 Thread Robert Bradshaw
On Nov 26, 2008, at 12:21 PM, Jason Grout wrote: Eli wrote: Hello, In the sage tutorial, I found how to solve equations: sage: x, b, c = var('x b c') sage: solve([x^2 + b*x + c == 0],x) [x == (-sqrt(b^2 - 4*c) - b)/2, x == (sqrt(b^2 - 4*c) - b)/2] However, I could not find how to assign

[sage-support] Re: QQbar bug

2008-11-26 Thread Robert Bradshaw
On Nov 26, 2008, at 3:30 AM, Simon King wrote: Dear Michael, On Nov 26, 11:34 am, mabshoff [EMAIL PROTECTED] dortmund.de wrote: please open a ticket. I would guess as you did that those two related. Done, it is # 4621. By the way, the above problem appears even more directly:

[sage-support] Re: latex output for real numbers without zeros at the end

2008-11-25 Thread Robert Bradshaw
a lot for pushing it a bit further! Stan On Nov 20, 11:03 pm, Robert Bradshaw [EMAIL PROTECTED] wrote: On Nov 20, 2008, at 1:54 AM, Stan Schymanski wrote: Thanks a lot for that, Robert! Seehttp://trac.sagemath.org/sage_trac/ticket/4572Do you want to review it? Is the ultimate fix the one

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-25 Thread Robert Bradshaw
On Nov 24, 2008, at 5:04 AM, Ondrej Certik wrote: On Mon, Nov 24, 2008 at 1:25 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y)

[sage-support] Re: sage notebook %latex cells fail to work properly; please help.

2008-11-25 Thread Robert Bradshaw
On Nov 25, 2008, at 4:26 PM, Gary Church wrote: Hello good folks, I've been doing more experimentation with the sage notebook interface on my Macbook Pro running OS X leopard in the Safari browser. I've been happy with the results of html cells (obtained by prefixing the cell with %html)

<    1   2   3   4   5   6   7   8   >