I have a numpy array of different numpy arrays and I want to make a deep copy of the arrays. I found out the following:
import numpy as np
pairs = [(2, 3),
import numpy as np
import copy
pairs = [(2, 3), (3, 4), (4, 5)]
array_of_arrays = np.array([np.arange(a*b).reshape(a,b) for (a, b) in pairs])
a = copy.deepcopy(array_of_arrays)
Feel free to read up more about this here.
Oh, here is simplest test case:
a[0][0,0]
print a[0][0,0], array_of_arrays[0][0,0]