Commit ffb036a6 authored by Reimar H Leike's avatar Reimar H Leike
Browse files

tried to fix a bug where clip on distributed data objects does not work and...

tried to fix a bug where clip on distributed data objects does not work and some bugs in previously made tests
parent 66ea2424
......@@ -307,7 +307,7 @@ for f in ["sqrt", "exp", "log", "tanh", "conjugate", "sin", "cos", "tan",
def clip(x, a_min=None, a_max=None):
return data_object(x.shape, np.clip(x.data, a_min, a_max), x.distaxis)
return data_object(x.shape, np.clip(x._data, a_min, a_max), x.distaxis)
def from_object(object, dtype, copy, set_locked):
......
......@@ -273,7 +273,7 @@ def test_err():
with assert_raises(TypeError):
ift.full(s1, [2, 3])
with assert_raises(TypeError):
ift.from_global_data(s2, [0,1])
ift.Field(s2, [0,1])
with assert_raises(TypeError):
f1.outer([0,1])
with assert_raises(ValueError):
......
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