[Matrix-SIG] Deepcopying numeric array

Stuart Reynolds S.I.Reynolds@cs.bham.ac.uk
Wed, 18 Aug 1999 12:12:59 +0100


Does anyone know why the Numeric arrays can't be deepcopied? Is it just
an omission?

Cheers

Stuart


>>> from Numeric import *
>>> a = array([1,2,3])
>>> a
array([1, 2, 3])


>>> from copy import *
>>> deepcopy(a)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "/bham/ums/common/pd/packages/Python/lib/python1.5/copy.py", line
147, in deepcopy
    raise error, \
copy.error: un-deep-copyable object of type <type 'array'>
>>>

-- 
Office: G8
School of Computer Science,
The University of Birmingham,
Edgbaston,
Birmingham, B15 2TT. UK.

tel: +44-(0)-121-414-7969
mailto:sir@cs.bham.ac.uk
http://www.cs.bham.ac.uk/~sir/