def cell_to_parent()

in src/h3/api/numpy_int/__init__.py [0:0]


def cell_to_parent(h, res=None):
    """
    Get the parent of a cell.

    Parameters
    ----------
    h : H3Cell
    res : int or None, optional
        The resolution for the parent
        If ``None``, then ``res = resolution(h) - 1``

    Returns
    -------
    H3Cell
    """
    h = _in_scalar(h)
    p = _cy.cell_to_parent(h, res)
    p = _out_scalar(p)

    return p