diff options
author | Stephan Hoyer <shoyer@google.com> | 2019-01-01 21:57:07 -0800 |
---|---|---|
committer | Stephan Hoyer <shoyer@google.com> | 2019-01-01 21:57:07 -0800 |
commit | 70f97a5040e20642b68e45d30e030a89ac89e665 (patch) | |
tree | 3f6ae620ff857478acfa91b1b8d4f8655d8cf373 | |
parent | 43298265ab35b82e29ff772c466872a78531fabd (diff) | |
download | numpy-70f97a5040e20642b68e45d30e030a89ac89e665.tar.gz |
TST: check exception details in refguide_check.py
xref GH-12548
-rw-r--r-- | numpy/core/multiarray.py | 5 | ||||
-rw-r--r-- | tools/refguide_check.py | 2 |
2 files changed, 4 insertions, 3 deletions
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 "<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. diff --git a/tools/refguide_check.py b/tools/refguide_check.py index 3d885e37f..6326a859b 100644 --- a/tools/refguide_check.py +++ b/tools/refguide_check.py @@ -613,7 +613,7 @@ def _run_doctests(tests, full_name, verbose, doctest_warnings): Returns: list of [(success_flag, output), ...] """ - flags = NORMALIZE_WHITESPACE | ELLIPSIS | IGNORE_EXCEPTION_DETAIL + flags = NORMALIZE_WHITESPACE | ELLIPSIS runner = DTRunner(full_name, checker=Checker(), optionflags=flags, verbose=verbose) |