Content-Length: 279243 | pFad | http://github.com/numpy/numpy/pull/23552/commits/a7d5de1f8dc9cb4544f35aeef7128669be7c3c0e

81 DOC: clarify int type constraint in numpy.bincount by onitake · Pull Request #23552 · numpy/numpy · GitHub
Skip to content

DOC: clarify int type constraint in numpy.bincount #23552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: clarify upper limit of bincount input dtype
  • Loading branch information
onitake committed May 11, 2025
commit a7d5de1f8dc9cb4544f35aeef7128669be7c3c0e
4 changes: 2 additions & 2 deletions numpy/_core/multiarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,8 @@ def bincount(x, weights=None, minlength=None):
>>> np.bincount(x).size == np.amax(x)+1
True

The input array needs to be of the native integer index type, otherwise a
TypeError is raised:
The input array needs have an integer dtype smaller or equal to the
native Python array index type, otherwise a TypeError is raised:

>>> np.bincount(np.arange(5, dtype=float))
Traceback (most recent call last):
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/numpy/numpy/pull/23552/commits/a7d5de1f8dc9cb4544f35aeef7128669be7c3c0e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy