The following behavior is very confusing to me.
I define a program
def test(a):
b=a
b = a^2
return b
Then if I assign
x = 2
and then execute
test(x)
4
I get x squared and x unchanged:
x
2
However suppose now that I want the same on a single
element of a matrix and define
Hello Giovanni,
you have hit one of my favorite Python Pitfalls: Python does always
call by value, but sometimes it behaves like call by reference .
The explanation is hidden in a footnote in the tutorial. Please see
Defining Functions in More Control Flow Tools in the Python
Tutorial:
That
On Dec 13, 6:50 pm, Jason Grout jason-s...@creativetrax.com wrote:
That sounds the best way. We'll make kernel_left/right (along with
left/right_kernel) the global functions, and people can do
kernel = left_kernel
in their init.sage or at the beginning of their session, if they want.
On Dec 14, 7:16 am, David Joyner wdjoy...@gmail.com wrote:
I'm guessing the asex are rendered last, so the lines get overwritten.
You can use
show(a1+a2+l1+l2+p,axes=False)
or
a1=arrow((0,0),(3,1),rgbcolor=(0,1,1))
a2=arrow((0,0),(-3.5,2.5),rgbcolor=(0,0,1))
I think the following is also a source of frustration:
v=vector([1,2,3])
rm=matrix(v)#This will be a row matrix
cm=v.transpose()#This will be a column matrix.
What would the convention be for this one? This came up in another
discussion:
Hello,
On Sun, Dec 14, 2008 at 4:04 PM, green351 mmamashra...@gmail.com wrote:
Hi,
This is my first time emailing with a question and my first time
trying to use Sage (I'm a complete programming dunce). I'm trying to
do the following:
Given the tuple (p,q) in Z x Z and integer n I need to
On Sun, Dec 14, 2008 at 12:20 PM, Spencer spencercar...@gmail.com wrote:
I'm running Sage 3.2.1 on Ubuntu 8.10 (hardware: Macbook 3,1 Santa
Rosa with Intel Core 2 Duo). On installing Sage and starting it up for
the first time I get the message:
WARNING! This Sage install was built on a
On Sun, 14 Dec 2008 at 05:09PM -0800, Mike Hansen wrote:
On Sun, Dec 14, 2008 at 4:04 PM, green351 mmamashra...@gmail.com wrote:
This is my first time emailing with a question and my first time
trying to use Sage (I'm a complete programming dunce). I'm trying to
do the following:
Given
On Sun, Dec 14, 2008 at 10:53 PM, John H Palmieri
jhpalmier...@gmail.com wrote:
I have some code which generates a bunch of expressions of the form
Sum (n_i a_i) where each n_i is an integer and each a_i is an unknown
in a field, and I'm most interested in the case when the field is GF
(p).
On Dec 14, 7:30 pm, William Stein wst...@gmail.com wrote:
On Sun, Dec 14, 2008 at 12:20 PM, Spencer spencercar...@gmail.com wrote:
Hi,
I'm running Sage 3.2.1 on Ubuntu 8.10 (hardware: Macbook 3,1 Santa
Rosa with Intel Core 2 Duo). On installing Sage and starting it up for
the first
On Sun, Dec 14, 2008 at 11:20 PM, mabshoff
michael.absh...@mathematik.uni-dortmund.de wrote:
On Dec 14, 7:30 pm, William Stein wst...@gmail.com wrote:
On Sun, Dec 14, 2008 at 12:20 PM, Spencer spencercar...@gmail.com wrote:
Hi,
I'm running Sage 3.2.1 on Ubuntu 8.10 (hardware: Macbook
11 matches
Mail list logo