Skip to content

Commit 25b13cc

Browse files
committed
Fix NumPy type aliases in docs.
Special options were added to Sphinx to prevent them from being expanded.
1 parent 51495cd commit 25b13cc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@
129129

130130
autodoc_member_order = "groupwise"
131131

132+
# Prevent type aliases from expanding
133+
autodoc_type_aliases = {
134+
"ArrayLike": "numpy.typing.ArrayLike",
135+
"NDArray": "numpy.typing.NDArray",
136+
}
137+
132138
# -- Options for HTML output ----------------------------------------------
133139

134140
# The theme to use for HTML and HTML Help pages. See the documentation for

tcod/noise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def sample_ogrid(self, ogrid: Sequence[ArrayLike]) -> NDArray[np.float32]:
321321
"""Sample an open mesh-grid array and return the result.
322322
323323
Args
324-
ogrid (Sequence[Sequence[float]]): An open mesh-grid.
324+
ogrid (Sequence[ArrayLike]): An open mesh-grid.
325325
326326
Returns:
327327
numpy.ndarray: An array of sampled points.

0 commit comments

Comments
 (0)