Commit 3688db9f authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'fix_from_global_data' into 'NIFTy_5'

fix from_global_data in distributed_do

See merge request !383
parents 7920af86 de358ce5
Pipeline #64905 passed with stages
in 22 minutes
...@@ -397,6 +397,8 @@ def from_global_data(arr, sum_up=False, distaxis=0): ...@@ -397,6 +397,8 @@ def from_global_data(arr, sum_up=False, distaxis=0):
raise TypeError raise TypeError
if sum_up: if sum_up:
arr = np_allreduce_sum(arr) arr = np_allreduce_sum(arr)
if arr.ndim == 0:
distaxis = -1
if distaxis == -1: if distaxis == -1:
return data_object(arr.shape, arr, distaxis) return data_object(arr.shape, arr, distaxis)
lo, hi = _shareRange(arr.shape[distaxis], ntask, rank) lo, hi = _shareRange(arr.shape[distaxis], ntask, rank)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment