From 70f97a5040e20642b68e45d30e030a89ac89e665 Mon Sep 17 00:00:00 2001 From: Stephan Hoyer Date: Tue, 1 Jan 2019 21:57:07 -0800 Subject: TST: check exception details in refguide_check.py xref GH-12548 --- numpy/core/multiarray.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'numpy/core/multiarray.py') diff --git a/numpy/core/multiarray.py b/numpy/core/multiarray.py index 4c2715892..3cc882055 100644 --- a/numpy/core/multiarray.py +++ b/numpy/core/multiarray.py @@ -893,8 +893,9 @@ def bincount(x, weights=None, minlength=None): >>> np.bincount(np.arange(5, dtype=float)) Traceback (most recent call last): - File "", line 1, in - 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. -- cgit v1.2.1