On Oct 18, 2008, at 10:14 PM, Alex Ghitza wrote:
> Hmmm. As far as I know you can use _ as a placeholder for a
> variable, and it's meant for this kind of use (where you don't
> really want to introduce a new variable name). It's strange that
> it doesn't work for you. Can you post the e
Hi Alex,
Sorry, it does work---it was a spacing problem. I should have copy-
and-paste yours.
Thanks
Pong
On Oct 18, 10:14 pm, "Alex Ghitza" <[EMAIL PROTECTED]> wrote:
> Hmmm. As far as I know you can use _ as a placeholder for a variable, and
> it's meant for this kind of use (where you d
Hmmm. As far as I know you can use _ as a placeholder for a variable, and
it's meant for this kind of use (where you don't really want to introduce a
new variable name). It's strange that it doesn't work for you. Can you
post the error message that you get?
I guess it's not a big deal since you
Hi Alex
Thanks for the quick reply. By _ you mean a variable? I tried your
syntax but it does not work.
However, [2*x for x in [3,4]] does work.
On Oct 18, 9:26 pm, "Alex Ghitza" <[EMAIL PROTECTED]> wrote:
> I'm not sure this is what you're hoping for, but it does the trick:
>
> sage: [
I'm not sure this is what you're hoping for, but it does the trick:
sage: [2*_ for _ in [3,4]]
[6,8]
Best,
Alex
On Sun, Oct 19, 2008 at 3:22 PM, pong <[EMAIL PROTECTED]> wrote:
>
> Is there any bulit-in function of sage which can multiply each element
> of a list of numbers by a constant?
>
>
Is there any bulit-in function of sage which can multiply each element
of a list of numbers by a constant?
e.g. I want 2*[3,4] = [6,8]
without calling pari/gp.
Thanks in advance
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.
On Oct 18, 12:56 am, "Alex Ghitza" <[EMAIL PROTECTED]> wrote:
> Sorry Martin, I completely missed the second sage: prompt in your original
> email.
>
> It's very likely that the problem is due to sage -upgrade. I don't know
> enough about these things to give you better advice than "start over
Sorry Martin, I completely missed the second sage: prompt in your original
email.
It's very likely that the problem is due to sage -upgrade. I don't know
enough about these things to give you better advice than "start over with a
fresh download of Sage", and you've mentioned that this might not b
I should have added: I did a sage -upgrade before.
Doing sage -upgrade again I now get:
Finished extraction
There is no spkg-install script, no setup.py, and no configure script,
so I do not know how to install
/home/martin/sage-3.1.1/spkg/standard/sage-3.1.2.spkg.
make: *** [installed/sage-3.1.
"Alex Ghitza" <[EMAIL PROTECTED]> writes:
> The correct syntax is sin(x), not sin x. And so the following works:
>
> sage: plot(sin(x), (-1,1))
please reread what I typed. Yes I made this error, but after that, I used the
correct syntax.
Martin
--~--~-~--~~~---~
The correct syntax is sin(x), not sin x. And so the following works:
sage: plot(sin(x), (-1,1))
Best,
Alex
--
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne --
Australia -- http://www.ms.unimelb.edu.au/~aghitza/
--~--~-~--~~~---~--~~
To
I am preparing the course for next week, but:
sage: plot(sin x, (-1,1))
File "", line 1
plot(sin x, (-Integer(1),Integer(1)))
^
SyntaxError: invalid syntax
sage: plot(sin(x), (-1,1))
--
12 matches
Mail list logo