As the title tells, the detail is: There is a dictionary to be deepcopied. it has 100 key-value pairs. every value is a list of 200000 float numbers. I'm perform deepcopy to everyone of the value like below:
-
curr_di_in_a = {}
-
for key,v in to_be_copy.items():
-
curr_di_in_a[key] = copy.deepcopy(v)
-
This process will be in a loop of 3 times. And an MemoryError occurs after 2 times looped.
It seems there is not enough space for the action. But the memory of the machine is about 4G. So is there any way to make a full use of the physical memory, or maybe I have made some mistakes? Help me! Thanks.