def test_draw_point2d_with_mismatched_dims(self, dtype, device):
        """Test that we raise if the len of the color tensor != the # of image channels."""
        points = torch.tensor([(1, 3), (2, 4)], device=device)
        color = torch.tensor([100], dtype=dtype, device=device)
        img = torch.zeros(3, 8, 8, dtype=dtype, device=device)
        with pytest.raises(Exception):
            draw_point2d(img, points, color)
Test that we raise if the len of the color tensor != the # of image channels.
tests/utils/test_draw.py