Skip to content

Improving the tensor API documentation #1114

Closed

Description

@diptorupd

The sphinx html generated from the docstring for tensor functions is a bit weird. The "->" in the description looks awkward and seems like a typo. Is it the intended rendering? E.g.,

broadcast_to() -> usm_ndarray Broadcast an array to a new shape; returns the broadcasted array as a view.

I suggest that the "->" be taken out.

Activity

  1. added
    documentation
    on Mar 13, 2023
  2. added a commit that references this issue on Mar 14, 2023
    be8f445
  3. diptorupd commented on Mar 14, 2023

    @diptorupd
    ContributorAuthor

    The issue stems from how dpctl's documentation generation script extracts the summary line from a docstring in case a signature is specified.

    The following logic is the culprit: generate_rst.py:

    def _get_doc_summary(obj):

    The function assumes that the closing parenthesis signifies the end of the signature and does not check for an -> followed by the return type.

  4. added a commit that references this issue on Mar 15, 2023
    742b603
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationtensor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions