diff options
author | Matti Picus <matti.picus@gmail.com> | 2020-02-28 13:05:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-28 13:05:20 +0200 |
commit | 7eaac94d183888639422c7b55471613f1d5bce18 (patch) | |
tree | 136f9c3672d7ce69b53ee45b18ed501c2e4a0af7 /numpy/core/multiarray.py | |
parent | e6c2765d428bdce57b6d5bf0554d177ab0b45bf5 (diff) | |
parent | 70f97a5040e20642b68e45d30e030a89ac89e665 (diff) | |
download | numpy-7eaac94d183888639422c7b55471613f1d5bce18.tar.gz |
Merge pull request #12646 from shoyer/refguide-check-exceptions
TST: check exception details in refguide_check.py
Diffstat (limited to 'numpy/core/multiarray.py')
-rw-r--r-- | numpy/core/multiarray.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/core/multiarray.py b/numpy/core/multiarray.py index a920b3687..e207280f0 100644 --- a/numpy/core/multiarray.py +++ b/numpy/core/multiarray.py @@ -909,8 +909,9 @@ def bincount(x, weights=None, minlength=None): >>> np.bincount(np.arange(5, dtype=float)) Traceback (most recent call last): - File "<stdin>", line 1, in <module> - TypeError: array cannot be safely cast to required type + ... + TypeError: Cannot cast array data from dtype('float64') to dtype('int64') + according to the rule 'safe' A possible use of ``bincount`` is to perform sums over variable-size chunks of an array, using the ``weights`` keyword. |