Create 10_division_of_parameter_array.py
This commit is contained in:
		
							
								
								
									
										9
									
								
								Tutorial/10_division_of_parameter_array.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								Tutorial/10_division_of_parameter_array.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
import numpy as np
 | 
			
		||||
import guan
 | 
			
		||||
 | 
			
		||||
cpus = 4
 | 
			
		||||
parameter_array_all = np.arange(0, 17, 1) 
 | 
			
		||||
for task_index in range(cpus):
 | 
			
		||||
    parameter_array = guan.preprocess_for_parallel_calculations(parameter_array_all, cpus, task_index)
 | 
			
		||||
    print(parameter_array)
 | 
			
		||||
    print()
 | 
			
		||||
		Reference in New Issue
	
	Block a user