On Thu, Jun 18, 2009 at 12:29 AM, Robert
Bradshaw wrote:
>
> On Jun 17, 2009, at 9:21 AM, William Stein wrote:
>
>> 2009/6/17 Robert Bradshaw :
>>>
>>> On Jun 17, 2009, at 3:05 AM, Utpal Sarkar wrote:
>>>
Thanks for the replies.
I noticed something funny: if you call x = var("X") in some
On Jun 17, 2009, at 9:21 AM, William Stein wrote:
> 2009/6/17 Robert Bradshaw :
>>
>> On Jun 17, 2009, at 3:05 AM, Utpal Sarkar wrote:
>>
>>> Thanks for the replies.
>>> I noticed something funny: if you call x = var("X") in some
>>> scope, it
>>> is X that is injected into the global scope, no
William Stein writes:
> 3. Having var at all is a compromise -- many symbolic calculus users
> would prefer for undefined vars to just "magically" be defined, as is
> done in Mathematica, Maple, Maxima, Axiom (?), etc.
In Axiom (FriCAS, OpenAxiom), there is a distinction between elements
of, sa
2009/6/17 Robert Bradshaw :
>
> On Jun 17, 2009, at 3:05 AM, Utpal Sarkar wrote:
>
>> Thanks for the replies.
>> I noticed something funny: if you call x = var("X") in some scope, it
>> is X that is injected into the global scope, not x. In fact I thought
>> that the argument was merely a print na
On Jun 17, 2009, at 3:05 AM, Utpal Sarkar wrote:
> Thanks for the replies.
> I noticed something funny: if you call x = var("X") in some scope, it
> is X that is injected into the global scope, not x. In fact I thought
> that the argument was merely a print name.
var("X") is what makes the varia
Thanks for the replies.
I noticed something funny: if you call x = var("X") in some scope, it
is X that is injected into the global scope, not x. In fact I thought
that the argument was merely a print name.
On Jun 17, 1:49 am, Dan Drake wrote:
> I ran into the problem discussed in this thread j
I ran into the problem discussed in this thread just the other day, and
my solution was to use sage.symbolic.ring. How does this solution
compare to the others posted in this thread? Here's (basically) what I
did:
from sage.symbolic.ring import var as symbvar
def foo(n, k):
t = sy
On Tue, Jun 16, 2009 at 3:55 PM, Utpal Sarkar wrote:
>
> I think global=False would be a nice option, also because there seem
> to be more differences between a symbolic variable created using "var"
> and "new_var" than just the scope; I noticed that while "var" creates
> a symbolic variable, "new
I think global=False would be a nice option, also because there seem
to be more differences between a symbolic variable created using "var"
and "new_var" than just the scope; I noticed that while "var" creates
a symbolic variable, "new_var" creates an expression (class
'sage.symbolic.expression.Ex
Thanks!
On Jun 16, 9:30 pm, William Stein wrote:
> On Tue, Jun 16, 2009 at 9:12 PM, Utpal Sarkar wrote:
>
> > Hi,
>
> > It looks like locally defined symbolic variables are always global, in
> > particular they overwrite globally defined variables of the same name:
> > sage: d = 0
> > sage: def
On Tue, Jun 16, 2009 at 9:12 PM, Utpal Sarkar wrote:
>
> Hi,
>
> It looks like locally defined symbolic variables are always global, in
> particular they overwrite globally defined variables of the same name:
> sage: d = 0
> sage: def f():
> : d = var('d')
> : d = 1
> :
> sage:
11 matches
Mail list logo