in src/h3/api/numpy_int/__init__.py [0:0]
def deconstruct_cell(h):
"""
Deconstruct cell into base cell and digits.
Parameters
----------
h : H3Cell
Cell to deconstruct.
Returns
-------
list of int
[base_cell_number, digit1, digit2, ..., digitN]
Examples
--------
>>> h = construct_cell(7, 2, 1, 4) # resolution 3 cell
>>> h
'830e8cfffffffff'
>>> deconstruct_cell(h)
(7, 2, 1, 4)
>>> h = construct_cell(15, 0, 0, 5, 3) # resolution 4 cell
>>> h
'841e057ffffffff'
>>> deconstruct_cell(h)
(15, 0, 0, 5, 3)
>>> construct_cell(*deconstruct_cell(h), 0) == cell_to_center_child(h)
"""
res = get_resolution(h)
bc = get_base_cell_number(h)
digits = [get_index_digit(h, r + 1) for r in range(res)]
return [bc, *digits]