def test_histc(self): x = torch.Tensor((2, 4, 2, 2, 5, 4)) y = torch.histc(x, 5, 1, 5) # nbins, min, max z = torch.Tensor((0, 3, 0, 2, 1)) self.assertEqual(y, z)