def test_set_z(): filename = os.path.join("tests", "testdata", "odense_rough.mesh") msh = Mesh(filename) zn = msh.node_coordinates[:, 2] zn[zn < -3] = -3 msh.set_z(zn) zn = msh.node_coordinates[:, 2] assert zn.min() == -3
def test_set_z(): filename = os.path.join("tests", "testdata", "odense_rough.mesh") msh = Mesh(filename) zn = msh.node_coordinates[:, 2] zn[zn < -3] = -3 msh.set_z(zn) zn = msh.node_coordinates[:, 2] assert zn.min() == -3 with pytest.raises(ValueError): # not same length msh.set_z(zn[0:4])