diff --git a/d2o/distributed_data_object.py b/d2o/distributed_data_object.py index 1106635815af7ac0f98171c187abcb7359ff3f51..7dbffbf77a6651d2d990773c5d75cdd79853ab78 100644 --- a/d2o/distributed_data_object.py +++ b/d2o/distributed_data_object.py @@ -189,7 +189,7 @@ class distributed_data_object(Loggable, Versionable, object): dtype=dtype, **kwargs) - self.distribution_strategy = distribution_strategy + self.distribution_strategy = self.distributor.distribution_strategy self.dtype = self.distributor.dtype self.shape = self.distributor.global_shape self.local_shape = self.distributor.local_shape diff --git a/d2o/distributor_factory.py b/d2o/distributor_factory.py index 13762bc529c07d93a6ee305f40cb479775fddd34..48c7fe0a6593a1f73c2532f7b82fc5588507f82b 100644 --- a/d2o/distributor_factory.py +++ b/d2o/distributor_factory.py @@ -320,7 +320,7 @@ class distributor(object): result_data = np.empty(self.local_shape, dtype=self.dtype) elif np.isscalar(data): result_data = np.empty(self.local_shape, dtype=self.dtype) - result_data[:] = data + result_data[()] = data elif isinstance(data, np.ndarray) or \ isinstance(data, distributed_data_object) or \ h5py_dataset_Q: