def test_scaling_error_dict(self): with pytest.raises(TypeError): pattern = mb.Random3DPattern(10, scale={'name': 'tim'})
def test_scaling_error_string(self): with pytest.raises(TypeError): pattern = mb.Random3DPattern(10, scale='tim')
def test_scale_vector_too_same_N_and_d(self): pattern = mb.Random3DPattern(100, seed=1) scale = np.arange(100) with pytest.raises(ValueError): pattern.scale(scale)
def test_scale_vector_col_vector_3points(self): pattern = mb.Random3DPattern(3, seed=1) scale = [[3.14159], [2.71828], [0.110001]] with pytest.raises(ValueError): pattern.scale(scale)
def test_scale_vector_too_few_dimensions_2points(self): pattern = mb.Random3DPattern(2, seed=1) scale = [3.14159, 2.71828] with pytest.raises(ValueError): pattern.scale(scale)