Repository: scipy/scipy
File: scipy/stats/_stats_py.py (Python)

Code before:
    median of the population underlying `x` is zero. The function returns an
    object including the test statistic, a p-value, and a method for computing
    the confidence interval around the quantile.

    Parameters
    ----------
    x : array_like
        A one-dimensional sample.
    q : float, default: 0
        The hypothesized value of the quantile.
    p : float, default: 0.5
        The probability associated with the quantile; i.e. the proportion of
        the population less than `q` is `p`. Must be strictly between 0 and
        1.
    alternative : {'two-sided', 'less', 'greater'}, optional
        Defines the alternative hypothesis.
        The following options are available (default is 'two-sided'):

        * 'two-sided': the quantile associated with the probability `p`
          is not `q`.
        * 'less': the quantile associated with the probability `p` is less
          than `q`.
        * 'greater': the quantile associated with the probability `p` is
          greater than `q`.
    axis : int or None, default: 0
        Axis along which the quantiles are computed.
        ``None`` ravels `x`, `q`, and `p` before performing the calculation,
        without checking whether the original shapes were compatible.
        As in other `scipy.stats` functions, a positive integer `axis` is resolved
        after prepending 1s to the shape of `x`, `q`, and `p` as needed until the arrays
        have the same dimensionality. When providing `x`, `q`, and `p` with different
        dimensionality, consider using negative `axis` integers for clarity.
    keepdims : bool, optional
        Consider the case in which `x` is 1-D and `p` and `q` are scalars: the quantile
        is a reducing statistic, and the default behavior is to return a scalar.
        If `keepdims` is set to True, the axis will not be reduced away, and the
        result will be a 1-D array with one element.

        The general case is more subtle, since multiple tests may be
        requested for each axis-slice of `x`. For instance, if `x`, `q`, and `p`
        are 1-D and ``p.size == q.size > 1``, no axis can be reduced away; there must be
        an axis to contain the results. Therefore:

        - By default, the axis will be reduced away if possible (i.e. if there is
          exactly one element of `p` and `q` per axis-slice of `x`).
        - If `keepdims` is set to True, the axis will not be reduced away.
        - If `keepdims` is set to False, the axis will be reduced away
          if possible, and an error will be raised otherwise.

    Returns
    -------

Review comment (suggestion):
```suggestion
        Axis of `x` along which the test is performed.
```

Code after:
    median of the population underlying `x` is zero. The function returns an
    object including the test statistic, a p-value, and a method for computing
    the confidence interval around the quantile.

    Parameters
    ----------
    x : array_like
        A one-dimensional sample.
    q : float, default: 0
        The hypothesized value of the quantile.
    p : float, default: 0.5
        The probability associated with the quantile; i.e. the proportion of
        the population less than `q` is `p`. Must be strictly between 0 and
        1.
    alternative : {'two-sided', 'less', 'greater'}, optional
        Defines the alternative hypothesis.
        The following options are available (default is 'two-sided'):

        * 'two-sided': the quantile associated with the probability `p`
          is not `q`.
        * 'less': the quantile associated with the probability `p` is less
          than `q`.
        * 'greater': the quantile associated with the probability `p` is
          greater than `q`.
    axis : int or None, default: 0
        Axis of `x` along which the test is performed.
        ``None`` ravels `x`, `q`, and `p` before performing the calculation,
        without checking whether the original shapes were compatible.
        As in other `scipy.stats` functions, a positive integer `axis` is resolved
        after prepending 1s to the shape of `x`, `q`, and `p` as needed until the arrays
        have the same dimensionality. When providing `x`, `q`, and `p` with different
        dimensionality, consider using negative `axis` integers for clarity.
    keepdims : bool, optional
        Consider the case in which `x` is 1-D and `p` and `q` are scalars: the test
        computes a reducing statistic, and the default behavior is to return a scalar.
        If `keepdims` is set to True, the axis will not be reduced away, and the
        result will be a 1-D array with one element.

        The general case is more subtle, since multiple tests may be
        requested for each axis-slice of `x`. For instance, if `x`, `q`, and `p`
        are 1-D and ``p.size == q.size > 1``, no axis can be reduced away; there must be
        an axis to contain the results. Therefore:

        - By default, the axis will be reduced away if possible (i.e. if there is
          exactly one element of `p` and `q` per axis-slice of `x`).
        - If `keepdims` is set to True, the axis will not be reduced away.
        - If `keepdims` is set to False, the axis will be reduced away
          if possible, and an error will be raised otherwise.

    Returns
    -------