Example #1
0
 def test_broadcast_dist_samples_to(self, samples_to_broadcast_to):
     to_shape, size, samples, broadcast_shape = samples_to_broadcast_to
     if broadcast_shape is not None:
         outs = broadcast_dist_samples_to(to_shape, samples, size=size)
         assert all(o.shape == broadcast_shape for o in outs)
     else:
         with pytest.raises(ValueError):
             broadcast_dist_samples_to(to_shape, samples, size=size)
Example #2
0
 def test_broadcast_dist_samples_to(self, samples_to_broadcast_to):
     to_shape, size, samples, broadcast_shape = samples_to_broadcast_to
     if broadcast_shape is not None:
         outs = broadcast_dist_samples_to(to_shape, samples, size=size)
         assert all((o.shape == broadcast_shape for o in outs))
     else:
         with pytest.raises(ValueError):
             broadcast_dist_samples_to(to_shape, samples, size=size)