def com_char(char):
    """
    Get the overall center-of-mass for a character

    Parameters
    ----------
    char : torch.Tensor
        (nsub_total, ncpt, 2) substrokes that define the character

    Returns
    -------
    center : torch.Tensor
        (2,) character center-of-mass

    """
    char = char.view(-1,2) # (nsub_total*2, 2)
    center = char.mean(0) # (2,)
    return center