- #1
EngWiPy
- 1,368
- 61
Hi, I know that Python supports parallel programming. I think it can be used in my case but not sure how. Basically I have this for loop
where func is some function that takes value as an argument. The different values in vec are independent, and can be used in parallel to calculate func(value). I am relatively new to Python, so, how can I convert this simple for loop to a code that will process the different independent values in parallel to speed up the results?
Thanks in advance
Python:
out = []
for value in vec:
out.append(func(value))
where func is some function that takes value as an argument. The different values in vec are independent, and can be used in parallel to calculate func(value). I am relatively new to Python, so, how can I convert this simple for loop to a code that will process the different independent values in parallel to speed up the results?
Thanks in advance