Skip to content

Commit f8a25e1

Browse files
committed
Fixed bad formatting, refactored
1 parent 088855b commit f8a25e1

File tree

11 files changed

+27
-24
lines changed

11 files changed

+27
-24
lines changed

docstring.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ def get_docstring_args(fd, file_name, func_name, class_name=None):
1717
msg += f"class: {class_name}\n"
1818
msg += f"function/method: {func_name}\n"
1919
raise RuntimeError(msg)
20-
if class_name is None and len(re.findall(r"Returns", docstring)) != 1:
20+
if len(re.findall(r"Returns", docstring)) != 1:
2121
msg = "Missing required 'Returns' section in docstring in \n"
2222
msg += f"file: {file_name}\n"
23+
if class_name is not None:
24+
msg += f"class: {class_name}\n"
2325
msg += f"function/method: {func_name}\n"
2426
raise RuntimeError(msg)
2527

stumpy/aamp_stimp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def __init__(
189189
The p-norm to apply for computing the Minkowski distance. Minkowski distance
190190
is typically used with `p` being 1 or 2, which correspond to the Manhattan
191191
distance and the Euclidean distance, respectively.
192-
192+
193193
Returns
194194
-------
195195
None
@@ -515,7 +515,7 @@ def __init__(
515515
The p-norm to apply for computing the Minkowski distance. Minkowski distance
516516
is typically used with `p` being 1 or 2, which correspond to the Manhattan
517517
distance and the Euclidean distance, respectively.
518-
518+
519519
Returns
520520
-------
521521
None
@@ -625,7 +625,7 @@ def __init__(
625625
The p-norm to apply for computing the Minkowski distance. Minkowski distance
626626
is typically used with `p` being 1 or 2, which correspond to the Manhattan
627627
distance and the Euclidean distance, respectively.
628-
628+
629629
Returns
630630
-------
631631
None

stumpy/aampi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(self, T, m, egress=True, p=2.0, k=1, mp=None):
109109
corresponding indices. The last two columns correspond to the top-1 left
110110
and top-1 right matrix profile indices. When None (default), this array is
111111
computed internally using `stumpy.aamp`.
112-
112+
113113
Returns
114114
-------
115115
None
@@ -183,7 +183,7 @@ def update(self, t):
183183
----------
184184
t : float
185185
A single new data point to be appended to `T`
186-
186+
187187
Returns
188188
-------
189189
None
@@ -211,7 +211,7 @@ def _update_egress(self, t):
211211
----------
212212
t : float
213213
A single new data point to be appended to `T`
214-
214+
215215
Returns
216216
-------
217217
None
@@ -280,7 +280,7 @@ def _update(self, t):
280280
----------
281281
t : float
282282
A single new data point to be appended to `T`
283-
283+
284284
Returns
285285
-------
286286
None

stumpy/floss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def __init__(
499499
`functools.partial`. Any subsequence with at least one np.nan/np.inf will
500500
automatically have its corresponding value set to False in this boolean
501501
array.
502-
502+
503503
Returns
504504
-------
505505
None

stumpy/gpu_aamp_stimp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __init__(
102102
The p-norm to apply for computing the Minkowski distance. Minkowski distance
103103
is typically used with `p` being 1 or 2, which correspond to the Manhattan
104104
distance and the Euclidean distance, respectively.
105-
105+
106106
Returns
107107
-------
108108
None

stumpy/gpu_stimp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def __init__(
164164
function using `functools.partial``. Any subsequence with at least one
165165
``np.nan``/``np.inf`` will automatically have its corresponding value set
166166
to ``False`` in this boolean array.
167-
167+
168168
Returns
169169
-------
170170
None

stumpy/mparray.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __new__(cls, input_array, m, k, excl_zone_denom):
6868
6969
excl_zone_denom : int
7070
The denominator used in computing the exclusion zone
71-
71+
7272
Returns
7373
-------
7474
obj : mparray
@@ -91,7 +91,7 @@ def __array_finalize__(self, obj):
9191
----------
9292
obj : object
9393
This is the class object
94-
94+
9595
Returns
9696
-------
9797
None

stumpy/scraamp.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ def __init__(
615615
The number of top `k` smallest distances used to construct the matrix
616616
profile. Note that this will increase the total computational time and
617617
memory usage when k > 1.
618-
618+
619619
Returns
620620
-------
621621
None
@@ -804,8 +804,9 @@ def P_(self):
804804
-------
805805
out1 : numpy.ndarray
806806
The updated (top-k) matrix profile. When `k=1` (default), this output is
807-
a 1D array consisting of the updated matrix profile. When `k > 1`, the output
808-
is a 2D array that has exactly `k` columns consisting of the updated top-k matrix profile.
807+
a 1D array consisting of the updated matrix profile. When `k > 1`, the
808+
output is a 2D array that has exactly `k` columns consisting of the updated
809+
top-k matrix profile.
809810
"""
810811
if self._k == 1:
811812
return self._P.flatten().astype(np.float64)

stumpy/scrump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ def __init__(
865865
by currying the user-defined function using `functools.partial`. Any
866866
subsequence with at least one np.nan/np.inf will automatically have its
867867
corresponding value set to False in this boolean array.
868-
868+
869869
Returns
870870
-------
871871
None

stumpy/stimp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def __init__(
186186
`functools.partial`. Any subsequence with at least one np.nan/np.inf will
187187
automatically have its corresponding value set to False in this boolean
188188
array.
189-
189+
190190
Returns
191191
-------
192192
None
@@ -566,7 +566,7 @@ def __init__(
566566
function using ``functools.partial``. Any subsequence with at least one
567567
``np.nan``/``np.inf`` will automatically have its corresponding value set
568568
to ``False`` in this boolean array.
569-
569+
570570
Returns
571571
-------
572572
None
@@ -747,7 +747,7 @@ def __init__(
747747
function using `functools.partial `. Any subsequence with at least one
748748
``np.nan``/``np.inf`` will automatically have its corresponding value set
749749
to ``False`` in this boolean array.
750-
750+
751751
Returns
752752
-------
753753
None

0 commit comments

Comments
 (0)