[sage-support] Re: type error when using numerical integration.

2010-04-01 Thread Jared Schlieper
On Mar 30, 9:48 am, Minh Nguyen nguyenmi...@gmail.com wrote: Hi Jared, On Wed, Mar 31, 2010 at 12:31 AM, Jared Schlieper dr.schlie...@gmail.com wrote: SNIP Am I missing something? Mathematica gives 3954.63 using the NIntegrate command. Is the following what you want? [mv...@sage

[sage-support] Re: type error when using numerical integration.

2010-04-01 Thread Jared Schlieper
On Mar 30, 10:31 am, Jason Grout jason-s...@creativetrax.com wrote: On 03/30/2010 08:31 AM, Jared Schlieper wrote: Greetings, I am in the process of converting calculus 3 assignments from Mathematica to Sage and came upon an error I can't figure out. Trying to find the mass of a

[sage-support] Re: type error when using numerical integration.

2010-03-30 Thread Jason Grout
On 03/30/2010 08:31 AM, Jared Schlieper wrote: Greetings, I am in the process of converting calculus 3 assignments from Mathematica to Sage and came upon an error I can't figure out. Trying to find the mass of a region bounded by two functions(g1,g2) with a given density. Below is the code,

[sage-support] Re: Type error

2008-12-19 Thread Jan Groenewald
Hi William, On Thu, Dec 18, 2008 at 08:40:37AM +0200, Jan Groenewald wrote: In this worksheet: http://users.aims.ac.za/~jan/type_of_variable.sws The type of a symbolic variable multiplied by a rational matrix does not return a rational matrix, but a

[sage-support] Re: Type error

2008-12-19 Thread David Joyner
On Fri, Dec 19, 2008 at 4:57 AM, Jan Groenewald j...@aims.ac.za wrote: ... sage: A=matrix([[1,2],[2,1]]);A [1 2] [2 1] sage: eig=A.eigenvectors_right();eig [(3, [ (1, 1) ], 1), (-1, [ (1, -1) ], 1)] sage: v=eig[0][1][0];v (1, 1) sage: var('t') t

[sage-support] Re: Type error

2008-12-19 Thread Marshall Hampton
I think its fair to call this a bug. I am still shaky on coercions in Sage so I am hesitant to file a trac report without hearing again from someone else. -M. Hampton On Dec 19, 5:42 am, David Joyner wdjoy...@gmail.com wrote: On Fri, Dec 19, 2008 at 4:57 AM, Jan Groenewald j...@aims.ac.za

[sage-support] Re: Type error

2008-12-19 Thread Jan Groenewald
Hi On Fri, Dec 19, 2008 at 05:31:30AM -0800, Marshall Hampton wrote: I think its fair to call this a bug. I am still shaky on coercions in Sage so I am hesitant to file a trac report without hearing again from someone else. Me too. The core is this: sage: var('t') t sage:

[sage-support] Re: Type error

2008-12-19 Thread daveloeffler
On Dec 19, 1:35 pm, Jan Groenewald j...@aims.ac.za wrote: The core is this:   sage: var('t')   t   sage: type(v)   type 'sage.modules.vector_rational_dense.Vector_rational_dense'   sage: type(v*t)   type

[sage-support] Re: Type error

2008-12-19 Thread Marshall Hampton
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 object, with the same values, would have different coercion behavior.

[sage-support] Re: Type error

2008-12-19 Thread Jason Grout
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 object, with the same values, would have

[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: Type error

2008-12-19 Thread William Stein
On Fri, Dec 19, 2008 at 12:22 PM, Jason Grout jason-s...@creativetrax.com wrote: Robert Bradshaw wrote: The problem comes up when the parent of v has a user-defined basis, instead of the standard basis: sage: v.parent() Vector space of degree 2 and dimension 1 over Rational Field User

[sage-support] Re: Type error

2008-12-19 Thread Jason Grout
William Stein wrote: It looks like eigenvectors are returned as the basis vectors of the eigenspace. Should they be returned as just plain old vectors instead? Yes, definitely. Then we don't have create a whole bunch of different vector spaces for no reason too. Okay, this is #4834.

[sage-support] Re: Type error

2008-12-18 Thread Jan Groenewald
Hi On Thu, Dec 18, 2008 at 08:40:37AM +0200, Jan Groenewald wrote: In this worksheet: http://users.aims.ac.za/~jan/type_of_variable.sws The type of a symbolic variable multiplied by a rational matrix does not return a rational matrix, but a