Esempio n. 1
0
 def test_randn_default_dtype(self):
     with mock.patch('dpnp.random.normal') as m:
         random.randn(1, 2, 3)
     m.assert_called_once_with(size=(1, 2, 3))
Esempio n. 2
0
 def test_randn_invalid_argument(self):
     with self.assertRaises(TypeError):
         random.randn(1, 2, 3, unnecessary='unnecessary_argument')
Esempio n. 3
0
 def test_randn(self):
     with mock.patch('dpnp.random.distributions.normal') as m:
         random.randn(1, 2, 3, dtype=numpy.float32)
     m.assert_called_once_with(size=(1, 2, 3), dtype=numpy.float32)