On Dec 7, 2007 10:39 PM, pgdoyle <[EMAIL PROTECTED]> wrote:
> > Please quite loudly tell us *everything* you are going to miss from
> > Mathematica. We want to know!
> >
>
> I can tell some things that I know how to do in Mathematica but don't
> know how to do in sage.
> Here are two such for sta
> In[16]:= Log[{{1,2},{3,4}}]
>
> Out[16]= {{0, Log[2]}, {Log[3], Log[4]}}
>
Well, actually this would be a good example of when the Listable runs
amok, since this isn't giving the Log of the matrix
as one might expect. Another example along this line is
multiplication of matrices:
In[28]:= {{
>
> Please quite loudly tell us *everything* you are going to miss from
> Mathematica. We want to know!
>
I can tell some things that I know how to do in Mathematica but don't
know how to do in sage.
Here are two such for starters.
1. ListPlot
http://reference.wolfram.com/mathematica/ref/List
On Dec 7, 10:17 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
> I think what confusing is the following:
>
> In[1]:= Pi // N
> Out[1]= 3.14159
> In[2]:= Pi // N + 2
> Out[2]= (2 + N)[Pi]
>
> What does it mean in Mathematica to add 2 to N? Does it just treat N
> as a formal symbol when you add 2
Mike Hansen wrote:
>> It means 5.+N applied to 5.85987. (In Mathematica f[x] is how you
>> would express applying f to x).
>
> I think what confusing is the following:
>
> In[1]:= Pi // N
> Out[1]= 3.14159
> In[2]:= Pi // N + 2
> Out[2]= (2 + N)[Pi]
>
> What does it mean in Mathematica to add
> It means 5.+N applied to 5.85987. (In Mathematica f[x] is how you
> would express applying f to x).
I think what confusing is the following:
In[1]:= Pi // N
Out[1]= 3.14159
In[2]:= Pi // N + 2
Out[2]= (2 + N)[Pi]
What does it mean in Mathematica to add 2 to N? Does it just treat N
as a form
> > In[7]:= Pi + E // N + 5 // N
>
> > Out[7]= (5. + N)[5.85987]
>
> Gees -- what in the heck does "(5. + N)[5.85987]" mean?
It means 5.+N applied to 5.85987. (In Mathematica f[x] is how you
would express applying f to x).
And here's why:
In[8]:= a+b//c+d//e
Out[8]= e[(c + d)[a + b]]
So Pi +
On Dec 7, 2007 9:32 AM, pgdoyle <[EMAIL PROTECTED]> wrote:
>
> Consider this python program:
>
>
> def foo():
> return 'foo'
>
> print foo()
>
> def mumble():
> print 'mumble',foo()
>
> mumble()
>
>
> If put this in a file foo.py and type `python foo.py' it p
On Dec 7, 2007 12:24 PM, Paul Zimmermann <[EMAIL PROTECTED]> wrote:
>
> > In[3]:= Pi \\ N
> > Syntax::sntxf: "Pi" cannot be followed by " \\ N".
> >
> > In[4]:= f \\ g
> >
> > Syntax::sntxf: "f" cannot be followed by " \\ g".
>
> please turn your '\' key by Pi/2:
Thanks. That we couldn't use in
> In[3]:= Pi \\ N
> Syntax::sntxf: "Pi" cannot be followed by " \\ N".
>
> In[4]:= f \\ g
>
> Syntax::sntxf: "f" cannot be followed by " \\ g".
please turn your '\' key by Pi/2:
In[2]:= f // g
Out[2]= g[f]
In[3]:= Pi // N
Out[3]= 3.14159
In[7]:= Pi + E // N + 5 // N
Out[7]= (5. + N)[5.859
> 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
On Dec 7, 2007 11:44 AM, pgdoyle <[EMAIL PROTECTED]> wrote:
> Thanks for the help - much appreciated!
>
> On Dec 3, 9:30 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
>
> > If you just need to substitute, you can do:
> >
> > sage: m.subs(x=1)
> > [-1 -1]
> > [-1 0]
> >
> > If you want to apply a m
Mike,
Thanks for the help - much appreciated!
On Dec 3, 9:30 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
> If you just need to substitute, you can do:
>
> sage: m.subs(x=1)
> [-1 -1]
> [-1 0]
>
> If you want to apply a more general map to the coefficients, then you can do:
>
> sage: m.apply_
Consider this python program:
def foo():
return 'foo'
print foo()
def mumble():
print 'mumble',foo()
mumble()
If put this in a file foo.py and type `python foo.py' it prints
foo
mumble foo
Same thing if I type 'sage foo.py'. Same thing if I put it in
14 matches
Mail list logo