Skip to content

Commit

Permalink
use parent_res instead of res
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriend committed Sep 27, 2024
1 parent 8765798 commit 4e9dd16
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/h3/api/basic_int/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,25 +367,24 @@ def cell_to_children(h, res=None):
return _out_collection(mv)


def cell_to_child_pos(child, res):
def cell_to_child_pos(child, parent_res):
"""
Child position index of given cell, with respect to parent of resolution ``res``.
Child position index of given cell, with respect to its parent at ``parent_res``.
The reverse operation can be done with ``child_pos_to_cell``.
Parameters
----------
child : H3Cell
res : int
Parent resolution
parent_res : int
Returns
-------
int
Integer index of the child with respect to parent cell.
"""
child = _in_scalar(child)
return _cy.cell_to_child_pos(child, res)
return _cy.cell_to_child_pos(child, parent_res)


def child_pos_to_cell(parent, child_res, child_pos):
Expand Down

0 comments on commit 4e9dd16

Please sign in to comment.