Cloning arrays in python

For single dimensions arrays:

a2 = a[:]
non-scalers within array will be copied as references. Does the same thing as copy.copy()

For multi dimension arrays:

import copy
a2 = copy.deepcopy(a)
non-scalers within array will be cloned as new objects

2 thoughts on “Cloning arrays in python

  1. Pingback: best wood waterproofing

  2. Pingback: waterproof coating iphone

Leave a Reply