This commit is contained in:
2024-04-02 13:53:11 +08:00
parent d838257642
commit ca1bb0b8df
11 changed files with 123 additions and 238 deletions

View 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()