Esempio n. 1
0
 def test_scaling_error_dict(self):
     with pytest.raises(TypeError):
         pattern = mb.Random3DPattern(10, scale={'name': 'tim'})
Esempio n. 2
0
 def test_scaling_error_string(self):
     with pytest.raises(TypeError):
         pattern = mb.Random3DPattern(10, scale='tim')
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)