Skip to content

Commit 23cd021

Browse files
committed
Docstrings
1 parent ee8d6da commit 23cd021

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/ptwt/packets.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def get_level(level: int, order: Literal["freq", "natural"] = "freq") -> list[st
210210
211211
Args:
212212
level (int): The depth of the tree.
213-
order (str): The order the paths are in.
213+
order: The order the paths are in.
214214
Choose from frequency order (``freq``) and
215215
natural order (``natural``).
216216
Defaults to ``freq``.
@@ -542,6 +542,21 @@ def get_level(level: int, order: Literal["natural"]) -> list[str]: ...
542542
def get_level(
543543
level: int, order: Literal["freq", "natural"] = "freq"
544544
) -> Union[list[str], list[list[str]]]:
545+
"""Return the paths to the filter tree nodes.
546+
547+
Args:
548+
level (int): The depth of the tree.
549+
order: The order the paths are in.
550+
Choose from frequency order (``freq``) and
551+
natural order (``natural``).
552+
Defaults to ``freq``.
553+
554+
Returns:
555+
A list with the paths to each node.
556+
557+
Raises:
558+
ValueError: If `order` is neither ``freq`` nor ``natural``.
559+
"""
545560
if order == "freq":
546561
return WaveletPacket2D.get_freq_order(level)
547562
elif order == "natural":

0 commit comments

Comments
 (0)