Skip to content

Commit 0855f47

Browse files
authored
Updated gpu-stimp docstring for RTD
1 parent 5c52f3d commit 0855f47

2 files changed

Lines changed: 21 additions & 4 deletions

File tree

docs/api.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ stumped
4747
gpu_stump
4848
=========
4949

50-
.. autofunction:: stumpy.gpu_stump(T_A, m, T_B=None, ignore_trivial=True, device_id=0, normalize=True)
50+
.. autofunction:: stumpy.gpu_stump(T_A, m, T_B=None, ignore_trivial=True, device_id=0, normalize=True, p=2.0)
5151

5252
mass
5353
====
@@ -115,7 +115,7 @@ ostinatoed
115115
gpu_ostinato
116116
============
117117

118-
.. autofunction:: stumpy.gpu_ostinato(Ts, m, device_id=0, normalize=True)
118+
.. autofunction:: stumpy.gpu_ostinato(Ts, m, device_id=0, normalize=True, p=2.0)
119119

120120
mpdist
121121
======
@@ -130,7 +130,7 @@ mpdisted
130130
gpu_mpdist
131131
==========
132132

133-
.. autofunction:: stumpy.gpu_mpdist(T_A, T_B, m, percentage=0.05, k=None, device_id=0, normalize=True)
133+
.. autofunction:: stumpy.gpu_mpdist(T_A, T_B, m, percentage=0.05, k=None, device_id=0, normalize=True, p=2.0)
134134

135135
motifs
136136
======
@@ -160,5 +160,5 @@ stimped
160160
gpu_stimp
161161
=========
162162

163-
.. autofunction:: stumpy.gpu_stimp(T, min_m=3, max_m=None, step=1, device_id=0)
163+
.. autofunction:: stumpy.gpu_stimp(T, min_m=3, max_m=None, step=1, device_id=0, normalize=True, p=2.0)
164164

stumpy/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
# Fix GPU-STIMP Docs
143143
# Note that this is a special case for class definitions.
144144
# See above for function definitions.
145+
# Also, please update docs/api.rst
145146
gpu_stimp.__doc__ = ""
146147
filepath = pathlib.Path(__file__).parent / "gpu_stimp.py"
147148

@@ -153,6 +154,22 @@
153154
for cd in class_definitions:
154155
if cd.name == "gpu_stimp":
155156
gpu_stimp.__doc__ = ast.get_docstring(cd)
157+
158+
# Fix GPU-AAMP-STIMP Docs
159+
# Note that this is a special case for class definitions.
160+
# See above for function definitions.
161+
# Also, please update docs/api.rst
162+
gpu_aamp_stimp.__doc__ = ""
163+
filepath = pathlib.Path(__file__).parent / "gpu_aamp_stimp.py"
164+
165+
file_contents = ""
166+
with open(filepath, encoding="utf8") as f:
167+
file_contents = f.read()
168+
module = ast.parse(file_contents)
169+
class_definitions = [node for node in module.body if isinstance(node, ast.ClassDef)]
170+
for cd in class_definitions:
171+
if cd.name == "gpu_aamp_stimp":
172+
gpu_aamp_stimp.__doc__ = ast.get_docstring(cd)
156173

157174
try:
158175
_dist = get_distribution("stumpy")

0 commit comments

Comments
 (0)