[sage-support] Re: Passing python functions?

2008-12-06 Thread Tim Lahey
On Dec 7, 2008, at 1:00 AM, Robert Bradshaw wrote: > > In Python you can pass functions around just like anything else. For > example > > sage: def foo(x): return x*x > : > sage: def call_it(f, n): return f(n) > : > sage: call_it(foo, 5) > 25 > That's handy. I wasn't expecting for it to

[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 chang

[sage-support] Passing python functions?

2008-12-06 Thread Tim Lahey
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 depending on the integral so I'd like to store the name in

[sage-support] Re: The dreaded dyld: Symbol not found: __cg_png_create_info_struct

2008-12-06 Thread William Stein
On Sat, Dec 6, 2008 at 12:25 PM, wayne w <[EMAIL PROTECTED]> wrote: > > ~/bash$sage > -- > | Sage Version 3.2.1, Release Date: 2008-12-01 | > | Type notebook() for the GUI, and license() for information.

[sage-support] Re: polygen vs. inject_variables

2008-12-06 Thread Robert Bradshaw
BTW, one gan get the generator with the gen() method. sage: R = GF(101)['y'] sage: R.gen() y An even easier shorthand is sage: R. = GF(101)['y'] or even simply sage: R. = GF(101)[] where the y appears on the left hand side, so an assignment is made. - Robert On Dec 6, 2008, at 12:09 PM, j

[sage-support] The dreaded dyld: Symbol not found: __cg_png_create_info_struct

2008-12-06 Thread wayne w
~/bash$sage -- | Sage Version 3.2.1, Release Date: 2008-12-01 | | Type notebook() for the GUI, and license() for information.| -- s

[sage-support] Re: polygen vs. inject_variables

2008-12-06 Thread john_perry_usm
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 you are misinterpreting

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

2008-12-06 Thread William Stein
On Sat, Dec 6, 2008 at 6:27 AM, Rafael <[EMAIL PROTECTED]> wrote: > Hello William, > > That seems to work great, except for the problem of computing the > hermitian conjugate of the unitary matrix u, > since > > sage: K. = QQ[sqrt(-1), sqrt(2)] > sage: j.conjugate() > 0 > > Can one define a conjug

[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 john_perry_usm
Sorry, I didn't expect that. Here are two examples: sage: R = GF(101)['y'] sage: y = polygen(R) sage: type(y) sage: y^3/y^2 x^3/x^2 sage: simplify(y^3/y^2) x^3/x^2 sage: R.inject_variables() Defining y sage: type(y) sage: y^3/y^2 y This is what t

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

2008-12-06 Thread Rafael
On Dec 6, 8:17 am, "William Stein" <[EMAIL PROTECTED]> wrote: > On Fri, Dec 5, 2008 at 10:12 PM, Jason Grout > > > > <[EMAIL PROTECTED]> wrote: > > > Jan Groenewald wrote: > >> Hi > > >> On Thu, Dec 04, 2008 at 11:22:11AM -0600, Jason Grout wrote: > http://sagenb.org:8000/home/pub/94/and inclu