[Matrix-SIG] array assignments

Pedro Miguel Frazao Fernandes Ferreira pfrazao@ualg.pt
Thu, 07 Oct 1999 10:50:32 +0100


Hi All,

	Can anyone tell me if this is the correct behaviour:

Python 1.5.1 (#1, Dec 17 1998, 20:58:15)  [GCC 2.7.2.3] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Executing startup script
End
>>> a=arange(10)
>>> b=arange(10)
>>> a=b
>>> b[5]=10
>>> print a
[ 0  1  2  3  4 10  6  7  8  9]
>>>

	Should a and b be two different objects ?
	= operator should copy ?

	Thanks
-- 
------------------------------------------------------------------------
    Pedro Miguel Frazao Fernandes Ferreira, Universidade do Algarve
          U.C.E.H., Campus de Gambelas, 8000 - Faro, Portugal
pfrazao@ualg.pt     Tel.:+351 89 800950 / 872959     Fax: +351 89 818560
                     http://w3.ualg.pt/~pfrazao