Skip to content

Commit

Permalink
doc: unify docstring style
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyolicoris committed Apr 2, 2024
1 parent 5ea1b10 commit 64fb16d
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions kamui/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ def get_2d_edges_and_simplices(
"""
Compute the edges and simplices for a 2D grid.
Args:
shape (Tuple[int, int]): The shape of the grid.
cyclical_axis (Union[int, Tuple[int, int]], optional): The axis/axes that should be treated as cyclical. Defaults to ().
Parameters
----------
shape : Tuple[int, int]
The shape of the grid.
cyclical_axis : Union[int, Tuple[int, int]], optional
The axis/axes that should be treated as cyclical. Defaults to ().
Returns:
Tuple[np.ndarray, Iterable[Iterable[int]]]: A tuple containing the edges and simplices of the grid.
Returns
-------
Tuple[np.ndarray, Iterable[Iterable[int]]]
A tuple containing the edges and simplices of the grid.
"""
nodes = np.arange(np.prod(shape)).reshape(shape)
if type(cyclical_axis) is int:
Expand Down Expand Up @@ -83,12 +88,17 @@ def get_3d_edges_and_simplices(
"""
Compute the edges and simplices for a 3D grid.
Args:
shape (Tuple[int, int, int]): The shape of the grid.
cyclical_axis (Union[int, Tuple[int, int]], optional): The axis/axes that should be treated as cyclical. Defaults to ().
Parameters
----------
shape : Tuple[int, int, int]
The shape of the grid.
cyclical_axis : Union[int, Tuple[int, int]], optional
The axis/axes that should be treated as cyclical. Defaults to ().
Returns:
Tuple[np.ndarray, Iterable[Iterable[int]]]: A tuple containing the edges and simplices of the grid.
Returns
-------
Tuple[np.ndarray, Iterable[Iterable[int]]]
A tuple containing the edges and simplices of the grid.
"""
nodes = np.arange(np.prod(shape)).reshape(shape)
if type(cyclical_axis) is int:
Expand Down

0 comments on commit 64fb16d

Please sign in to comment.