Dear all,
I tried to store sets of parameter values for plotting in
dictionaries, but the dictionaries do not seem independent. If I
delete an entry in one, it disappears in the other one, too. Am I
doing something wrong or is this a bug? See the example session
below.
Thanks for your help
Hi, Stan,
On Nov 4, 2008, at 00:47 , Stan Schymanski wrote:
Sorry, I should have looked around a bit more. If I replace pars1 =
pars
by pars1 = pars.copy() in the below code, the two dictionaries are
independent.
You found part of the story, but there's a bit more. Consider this
Hi all,
is there in SAGE a function similar to Mathematica's Collect ?
Thanks a lot,
-- Mai
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options,
There isn't really, but it would be nice to have one. For the
symbolic ring, the coefficients function does a lot of what you might
want:
var('a,b,x,y')
q = (1 + a + x)^4
q.expand().coefficients(a)
[[x^4 + 4*x^3 + 6*x^2 + 4*x + 1, 0], [4*x^3 + 12*x^2 + 12*x + 4, 1],
[6*x^2 + 12*x + 6, 2], [4*x
On Tue, Nov 4, 2008 at 7:40 AM, Georg [EMAIL PROTECTED] wrote:
Hi,
using sage 3.1.3,
the following works fine:
sage: def fun(time = 5):
: time = RDF(time)
: return time
:
sage: fun(3)
3.0
if you write this function into a script called 'time.sage', loading
this
On Tue, Nov 4, 2008 at 7:23 AM, mai [EMAIL PROTECTED] wrote:
Hi all,
is there in SAGE a function similar to Mathematica's Collect ?
Thanks a lot,
-- Mai
Mathematica's Collect is described here:
http://reference.wolfram.com/mathematica/ref/Collect.html
Sage's coeffs function does
Dear William
Thanks a lot for that. I just signed up for the new sagenb.org
notebook and tried out qepcad, but I get a permission error when
executing the example from the documentation:
...
qepcad('(E x)[a x + b 0]', vars='(a,b,x)')
Traceback (click to the left for traceback)
...
IOError:
That definitely looks like a bug in the preparser. Do report
it to trac.
William
Do you mean that I should report it to trac?
If yes, no problem, I just never did it, no experience,
what priority?
what milestone?
shall I choose?
Georg
Thanks a lot, Justin! That's good to know. Incidentally, isn't it a bit
inconsistent to have different behaviour for assignments related to
lists and dictionaries than those related to symbolic variables?
Example:
sage: L1=[1,2,3];L2=[3,4,5]
sage: L=[L1,L2]
sage: L
[[1, 2, 3], [3, 4, 5]]
On Tue, Nov 4, 2008 at 9:03 AM, Stan Schymanski [EMAIL PROTECTED] wrote:
Thanks a lot, Justin! That's good to know. Incidentally, isn't it a bit
inconsistent to have different behaviour for assignments related to
lists and dictionaries than those related to symbolic variables?
The behavior
On Tue, Nov 4, 2008 at 8:52 AM, Georg [EMAIL PROTECTED] wrote:
That definitely looks like a bug in the preparser. Do report
it to trac.
William
Do you mean that I should report it to trac?
Sure.
If yes, no problem, I just never did it, no experience,
Oops, I didn't realize you
Hi William,
Thanks for the clarification. I think I see a bit of a light in the fog.
So since lists and dictionaries are immutable objects, any references to
them must always refer to the same thing. Consequently, if the result of
the reference is to be changed, the object itself has to
Sorry, I should have looked around a bit more. If I replace pars1 = pars
by pars1 = pars.copy() in the below code, the two dictionaries are
independent.
Stan
Stan Schymanski wrote:
Dear all,
I tried to store sets of parameter values for plotting in
dictionaries, but the dictionaries do
I think what William meant to say is that lists and dictionaries are
mutable. When you do LL = L, both LL and L point to the same actual
list, so things you do to the one are reflected in the other. When
you do LL = 2*L, it's making a completely new list.
This is a Python thing, not
Hi Stan,
On Tue, Nov 4, 2008 at 11:51 AM, Stan Schymanski [EMAIL PROTECTED] wrote:
Thanks for the clarification. I think I see a bit of a light in the fog.
So since lists and dictionaries are immutable objects, any references to
them must always refer to the same thing.
William had a typo in
Is there a way to resize the Jmol window? plot3d doesn't seem to take
a size parameter and I couldn't discover any resizing controls on the
window even though the Jmol homepage seems to indicate that resizing
should be possible.
Also, is there a way to set the aspect ratio? E.g.
var('t')
On Tue, Nov 4, 2008 at 12:03 PM, Tanveer Gani [EMAIL PROTECTED] wrote:
Is there a way to resize the Jmol window? plot3d doesn't seem to take
a size parameter
You can use the figsize parameter to change the figure size:
var('x,y')
plot3d(sin(x*y), (x,-pi, pi), (y,-pi,pi),figsize=3)
This is a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Stan,
I think I saw one question you asked that hasn't been answered yet:
Stan Schymanski wrote:
snip
If I construct a list out of two other lists, I usually don't
expect the original lists to change if I manipulate the resulting
list. How
On Tue, Nov 4, 2008 at 3:06 PM, kex [EMAIL PROTECTED] wrote:
Hi!
J is an equation with variables defined in ## my variables
What I want to do is plot the J versus x
x is a list of values lets say from -100 to 40
so how do I change from x=1 to x=[-100,..,40]
and fix this error:
On Tue, Nov 4, 2008 at 1:05 AM, Stan Schymanski [EMAIL PROTECTED] wrote:
Dear William
Thanks a lot for that. I just signed up for the new sagenb.org
notebook and tried out qepcad, but I get a permission error when
executing the example from the documentation:
...
qepcad('(E x)[a x + b
Hi, Jason,
On Nov 4, 2008, at 14:38 , Jason Bandlow wrote:
Hi Stan,
I think I saw one question you asked that hasn't been answered yet:
Stan Schymanski wrote:
snip
If I construct a list out of two other lists, I usually don't
expect the original lists to change if I manipulate the
Thanks! Both suggestions worked. However, documentation brought up by
tab-completion did not mention figsize or aspect_ratio (tab-completion
for show() does mention figsize). The documentation seems to be dated.
Tanveer.
On Nov 4, 2:29 pm, William Stein [EMAIL PROTECTED] wrote:
On Tue, Nov 4,
22 matches
Mail list logo