Example #1
0
 def test_histogram_auto(self):
     np.random.seed(0)
     compare_proto(
         summary.histogram('dummy',
                           np.random.rand(1024),
                           bins='auto',
                           max_bins=5), self)
 def test_empty_input(self):
     print('expect error here:')
     with pytest.raises(Exception) as e_info:
         summary.histogram('dummy', np.ndarray(0), 'tensorflow')
 def test_list_input(self):
     with pytest.raises(Exception) as e_info:
         summary.histogram('dummy', [1,3,4,5,6], 'tensorflow')
Example #4
0
 def test_histogram_doane(self):
     compare_proto(summary.histogram('dummy', tensor_N(shape=(1024,)), bins='doane', max_bins=5), self)