Commit 9061442d authored by theos's avatar theos
Browse files

Fixed a bug in apply_scalar_function.

parent 28cf619a
......@@ -434,10 +434,12 @@ class distributed_data_object(object):
result_data = np.vectorize(function,
if inplace is True:
if inplace:
result_d2o = self
result_d2o = self.copy_empty(dtype=result_data.dtype)
if dtype is None:
dtype = result_data.dtype
result_d2o = self.copy_empty(dtype=dtype)
result_d2o.set_local_data(result_data, copy=False)
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