From 225c3360721ba515de88a1e191ede58e8b95593d Mon Sep 17 00:00:00 2001 From: stuartarchibald Date: Mon, 5 Oct 2020 18:20:21 +0100 Subject: BUG: Fixes incorrect error message in numpy.ediff1d (#17457) Fixes the error message reported by ediff1d in the case of an invalid to_begin and updates tests to assert validity. Co-authored-by: Ross Barnowski --- numpy/lib/arraysetops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/arraysetops.py') diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index 9464692e0..6c6c1ff80 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -93,7 +93,7 @@ def ediff1d(ary, to_end=None, to_begin=None): else: to_begin = np.asanyarray(to_begin) if not np.can_cast(to_begin, dtype_req, casting="same_kind"): - raise TypeError("dtype of `to_end` must be compatible " + raise TypeError("dtype of `to_begin` must be compatible " "with input `ary` under the `same_kind` rule.") to_begin = to_begin.ravel() -- cgit v1.2.1