Skip to content

[ENH] Convert all docstrings to numpydoc format#712

Merged
fkiraly merged 5 commits intomainfrom
copilot/change-docstrings-to-numpydoc
Feb 27, 2026
Merged

[ENH] Convert all docstrings to numpydoc format#712
fkiraly merged 5 commits intomainfrom
copilot/change-docstrings-to-numpydoc

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

Converts all docstrings across the pypfopt module from Sphinx/reStructuredText style to NumPy docstring format, with no content changes (content-only fixes are typos/formatting). Fixes #688

Changes

  • Format conversion across 13 source files: :param/:type/:return:/:rtype:/:raises → structured Parameters, Returns, Raises sections

Before

def mean_historical_return(prices, returns_data=False, ...):
    """
    :param prices: adjusted closing prices
    :type prices: pd.DataFrame
    :param returns_data: if true, first arg is returns
    :type returns_data: bool, defaults to False.
    :return: annualised mean return for each asset
    :rtype: pd.Series
    """

After

def mean_historical_return(prices, returns_data=False, ...):
    """
    Parameters
    ----------
    prices : pd.DataFrame
        adjusted closing prices
    returns_data : bool, optional
        if true, first arg is returns. Defaults to False.

    Returns
    -------
    pd.Series
        annualised mean return for each asset
    """

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@fkiraly fkiraly added the documentation Documentation & tutorials label Feb 27, 2026
Copilot AI and others added 2 commits February 27, 2026 00:41
Co-authored-by: fkiraly <7985502+fkiraly@users.noreply.github.com>
Co-authored-by: fkiraly <7985502+fkiraly@users.noreply.github.com>
Copilot AI changed the title [WIP] Update docstrings to numpydoc format with minor fixes Convert all docstrings to numpydoc format Feb 27, 2026
@fkiraly fkiraly changed the title Convert all docstrings to numpydoc format [ENH] Convert all docstrings to numpydoc format Feb 27, 2026
@fkiraly fkiraly marked this pull request as ready for review February 27, 2026 08:11
@fkiraly fkiraly merged commit d7f2fc6 into main Feb 27, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation & tutorials

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOC] consequent use of numpydoc style docstrings

2 participants