Skip to content

DOC: add td64 example in np.mean - #27168

Merged
jorenham merged 4 commits into
numpy:mainfrom
guan404ming:mean-td64-doc
Aug 11, 2024
Merged

jorenham merged 4 commits into
numpy:mainfrom
guan404ming:mean-td64-doc

Conversation

@guan404ming

@guan404ming guan404ming commented Aug 10, 2024 •

Copy link
Copy Markdown
Member

Description

This PR add timedelta64 example in np.mean

refer #27157

Changes made

  • add example below

    Computing the mean in timedelta64 is available:
    >>> b = np.array([np.timedelta64(1,'D'), np.timedelta64(3,'D')])
    >>> np.mean(b)
    2 days
    

Comment thread numpy/_core/fromnumeric.py Outdated
Comment thread numpy/_core/fromnumeric.py
@jorenham

Copy link
Copy Markdown
Member

Looks good, thanks :)

@jorenham
jorenham merged commit 32a2304 into numpy:main Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants