I have a list of number:
a=[1,2,3,4,5,.....2000] I have to square each number and update the same array, but instead of writing a loop i want to do it using parallel processing.
So squaring each number in the array becomes a process in itself.
Expected output=[1,3,9,16,25,........] How can i achieve this with python multiprocessing library?
Already tried to Use threading library but the code is not fast enough, plus Threading library is not using all the cores.
numpythen you could do this a lot quicker than I imagine multiprocessing ever could.