Skip to content

DOC: Missing signature for np.timedelta64 #14328

Closed

Description

@excalamus

No explanation of the arguments for np.timedelta64 in the documentation.

Reproducing example:

  1. Goto the np.timedelta64 documentation

  2. Read the documentation and see references to things like np.timedelta64(1,'D')

  3. Try to figure out what the 1 and D specifically refer to without inferring

Numpy/Python version information:

>>> import sys, numpy; print(numpy.__version__, sys.version)
1.17.0 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]

Documentation as of July 26, 2019: https://web.archive.org/save/https://docs.scipy.org/doc/numpy/reference/arrays.datetime.html?highlight=timedelta64

Suggested fix

At the very top, in first paragraph section titled "Datetimes and Timedeltas", include a signature like

dtype np.timedelta(<increment>, <unit>)
<increment>: number of units
<unit>: time unit, such as (D)ay, (M)onth, (Y)ear.  See Datetime Units.

Activity

  1. changed the title [-]No function signatures in the documentation[/-] [+]Missing signature for `np.timedelta`[/+] on Aug 22, 2019
  2. changed the title [-]Missing signature for `np.timedelta`[/-] [+]Missing signature for `np.timedelta64`[/+] on Aug 22, 2019
  3. changed the title [-]Missing signature for `np.timedelta64`[/-] [+]DOC: Missing signature for `np.timedelta64`[/+] on Aug 28, 2019
  4. hypercubestart commented on Sep 11, 2019

    @hypercubestart
    Contributor

    @mattip I submitted a PR, please let me know if there is anything I can improve on. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions