@@ -1604,68 +1604,69 @@ def mass(
16041604 Parameters
16051605 ----------
16061606 Q : numpy.ndarray
1607- Query array or subsequence
1607+ Query array or subsequence.
16081608
16091609 T : numpy.ndarray
1610- Time series or sequence
1610+ Time series or sequence.
16111611
16121612 M_T : numpy.ndarray, default None
1613- Sliding mean of `T`
1613+ Sliding mean of ``T``.
16141614
16151615 Σ_T : numpy.ndarray, default None
1616- Sliding standard deviation of `T`
1616+ Sliding standard deviation of ``T``.
16171617
16181618 normalize : bool, default True
1619- When set to `True`, this z-normalizes subsequences prior to computing distances.
1620- Otherwise, this function gets re-routed to its complementary non-normalized
1621- equivalent set in the `@core.non_normalized` function decorator.
1619+ When set to ``True``, this z-normalizes subsequences prior to computing
1620+ distances. Otherwise, this function gets re-routed to its complementary
1621+ non-normalized equivalent set in the ``@core.non_normalized`` function
1622+ decorator.
16221623
16231624 p : float, default 2.0
16241625 The p-norm to apply for computing the Minkowski distance. This parameter is
1625- ignored when `normalize == True`.
1626+ ignored when `` normalize == True` `.
16261627
16271628 T_subseq_isfinite : numpy.ndarray, default None
1628- A boolean array that indicates whether a subsequence in `T ` contains a
1629- `np.nan`/` np.inf` value (False). This parameter is ignored when
1630- `normalize= True`.
1629+ A boolean array that indicates whether a subsequence in ``T` ` contains a
1630+ `` np.nan``/`` np.inf`` value (`` False`` ). This parameter is ignored when
1631+ `` normalize == True` `.
16311632
16321633 T_subseq_isconstant : numpy.ndarray or function, default None
1633- A boolean array that indicates whether a subsequence in `T ` is constant
1634- (True). Alternatively, a custom, user-defined function that returns a
1635- boolean array that indicates whether a subsequence in `T ` is constant
1636- (True). The function must only take two arguments, `a `, a 1-D array,
1637- and `w `, the window size, while additional arguments may be specified
1638- by currying the user-defined function using `functools.partial`. Any
1639- subsequence with at least one np.nan/ np.inf will automatically have its
1640- corresponding value set to False in this boolean array.
1634+ A boolean array that indicates whether a subsequence in ``T` ` is constant
1635+ (`` True`` ). Alternatively, a custom, user-defined function that returns a
1636+ boolean array that indicates whether a subsequence in ``T` ` is constant
1637+ (`` True`` ). The function must only take two arguments, ``a` `, a 1-D array,
1638+ and ``w` `, the window size, while additional arguments may be specified
1639+ by currying the user-defined function using `` functools.partial` `. Any
1640+ subsequence with at least one `` np.nan``/`` np.inf`` will automatically have
1641+ its corresponding value set to `` False`` in this boolean array.
16411642
16421643 Q_subseq_isconstant : numpy.ndarray or function, default None
1643- A boolean array that indicates whether the subsequence in `Q ` is constant
1644- (True). Alternatively, a custom, user-defined function that returns a
1645- boolean array that indicates whether the subsequence in `Q ` is constant
1646- (True). The function must only take two arguments, `a `, a 1-D array,
1647- and `w `, the window size, while additional arguments may be specified
1648- by currying the user-defined function using `functools.partial`. Any
1649- subsequence with at least one np.nan/ np.inf will automatically have its
1650- corresponding value set to False in this boolean array.
1644+ A boolean array that indicates whether the subsequence in ``Q` ` is constant
1645+ (`` True`` ). Alternatively, a custom, user-defined function that returns a
1646+ boolean array that indicates whether the subsequence in ``Q` ` is constant
1647+ (`` True`` ). The function must only take two arguments, ``a` `, a 1-D array,
1648+ and ``w` `, the window size, while additional arguments may be specified
1649+ by currying the user-defined function using `` functools.partial` `. Any
1650+ subsequence with at least one `` np.nan``/`` np.inf`` will automatically have
1651+ its corresponding value set to `` False`` in this boolean array.
16511652
16521653 query_idx : int, default None
1653- This is the index position along the time series, `T `, where the query
1654- subsequence, `Q` , is located. `query_idx` should be set to None if `Q`
1655- is not a subsequence of `T` . If `Q` is a subsequence of `T`, provding
1656- this argument is optional. If query_idx is provided, the distance
1657- between Q and `T[query_idx : query_idx + m]` will automatically be set to
1654+ This is the index position along the time series, ``T` `, where the query
1655+ subsequence, ``Q`` , is located. `` query_idx`` should be set to `` None`` if
1656+ ``Q`` is not a subsequence of ``T`` . If ``Q`` is a subsequence of ``T``,
1657+ provding this argument is optional. If `` query_idx`` is provided, the distance
1658+ between ``Q`` and `` T[query_idx : query_idx + m]` ` will automatically be set to
16581659 zero.
16591660
16601661 Returns
16611662 -------
16621663 distance_profile : numpy.ndarray
1663- Distance profile
1664+ Distance profile.
16641665
16651666 See Also
16661667 --------
1667- stumpy.motifs : Discover the top motifs for time series `T `
1668- stumpy.match : Find all matches of a query `Q` in a time series `T` ``
1668+ stumpy.motifs : Discover the top motifs for time series ``T` `
1669+ stumpy.match : Find all matches of a query ``Q`` in a time series ``T ``
16691670
16701671 Notes
16711672 -----
@@ -1674,10 +1675,10 @@ def mass(
16741675
16751676 See Table II
16761677
1677- Note that Q, T are not directly required to calculate D
1678+ Note that ``Q``, ``T`` are not directly required to calculate ``D``
16781679
1679- Note: Unlike the Matrix Profile I paper, here, M_T, Σ_T can be calculated
1680- once for all subsequences of T and passed in so the redundancy is removed
1680+ Note: Unlike the Matrix Profile I paper, here, `` M_T``, `` Σ_T`` can be calculated
1681+ once for all subsequences of ``T`` and passed in so the redundancy is removed
16811682
16821683 Examples
16831684 --------
@@ -2550,7 +2551,7 @@ def rolling_isconstant(a, w, a_subseq_isconstant=None):
25502551 w : numpy.ndarray
25512552 The rolling window size
25522553
2553- a_subseq_isconstant : np .ndarray or function, default None
2554+ a_subseq_isconstant : numpy .ndarray or function, default None
25542555 A boolean array that indicates whether a subsequence in `a` is constant
25552556 (True). Alternatively, a custom, user-defined function that returns a
25562557 boolean array that indicates whether a subsequence in `a` is constant
@@ -2677,7 +2678,7 @@ def _get_partial_mp_func(mp_func, client=None, device_id=None):
26772678
26782679 device_id : int or list, default None
26792680 The (GPU) device number to use. The default value is `0`. A list of
2680- valid device ids (int) may also be provided for parallel GPU-STUMP
2681+ valid device ids (`` int`` ) may also be provided for parallel GPU-STUMP
26812682 computation. A list of all valid device ids can be obtained by
26822683 executing `[device.id for device in numba.cuda.list_devices()]`.
26832684
@@ -4067,7 +4068,7 @@ def _compute_P_ABBA(
40674068
40684069 device_id : int or list, default None
40694070 The (GPU) device number to use. The default value is `0`. A list of
4070- valid device ids (int) may also be provided for parallel GPU-STUMP
4071+ valid device ids (`` int`` ) may also be provided for parallel GPU-STUMP
40714072 computation. A list of all valid device ids can be obtained by
40724073 executing `[device.id for device in numba.cuda.list_devices()]`.
40734074
@@ -4172,7 +4173,7 @@ def _mpdist(
41724173
41734174 device_id : int or list, default None
41744175 The (GPU) device number to use. The default value is `0`. A list of
4175- valid device ids (int) may also be provided for parallel GPU-STUMP
4176+ valid device ids (`` int`` ) may also be provided for parallel GPU-STUMP
41764177 computation. A list of all valid device ids can be obtained by
41774178 executing `[device.id for device in numba.cuda.list_devices()]`.
41784179
@@ -4240,15 +4241,15 @@ def process_isconstant(T, m, T_subseq_isconstant, T_subseq_isfinite=None):
42404241 m : numpy.ndarray
42414242 The rolling window size
42424243
4243- T_subseq_isconstant : np .ndarray, function, or list, default None
4244- A parameter that is used to show whether a subsequence of a time series in `T `
4245- is constant (True) or not. T_subseq_isconstant can be a 1D or 2D boolean
4246- numpy.ndarry (depending on the dimension of `T` ) or a function that can be
4247- applied to each time series in `T` . Alternatively, for maximum flexibility, a
4248- list (with length equal to the total number of time series) may also be used.
4249- In this case, T_subseq_isconstant[i] corresponds to the i-th time series T[i]
4250- and each element in the list can either be 1D boolean np.ndarray, a function,
4251- or None.
4244+ T_subseq_isconstant : numpy .ndarray, function, or list, default None
4245+ A parameter that is used to show whether a subsequence of a time series in ``T` `
4246+ is constant (`` True`` ) or not. `` T_subseq_isconstant`` can be a 1D or 2D
4247+ boolean `` numpy.ndarray`` (depending on the dimension of ``T`` ) or a function
4248+ that can be applied to each time series in ``T`` . Alternatively, for maximum
4249+ flexibility, a list (with length equal to the total number of time series) may
4250+ also be used. In this case, `` T_subseq_isconstant[i]`` corresponds to the
4251+ ``i``-th time series ``T[i]`` and each element in the list can either be 1D
4252+ boolean ``numpy.ndarray``, a function, or `` None`` .
42524253
42534254 T_subseq_isfinite : numpy.ndarray, default None
42544255 A boolean array that indicates whether a subsequence in `T` contains a
0 commit comments