From 81bd37e73b854974312a971d0742793caf425684 Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Wed, 1 Aug 2018 17:27:32 -0700 Subject: TST: add broadcast_arrays() kwarg unit test for TypeError * broadcast_arrays() is now tested for the case when an invalid keyword argument is used; the appropriate error string content is also tested for * the TypeError message produced in the above case has been restored to the correct value in Python 3 --- numpy/lib/stride_tricks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/stride_tricks.py') diff --git a/numpy/lib/stride_tricks.py b/numpy/lib/stride_tricks.py index bc5993802..ca13738c1 100644 --- a/numpy/lib/stride_tricks.py +++ b/numpy/lib/stride_tricks.py @@ -242,7 +242,7 @@ def broadcast_arrays(*args, **kwargs): subok = kwargs.pop('subok', False) if kwargs: raise TypeError('broadcast_arrays() got an unexpected keyword ' - 'argument {!r}'.format(kwargs.keys()[0])) + 'argument {!r}'.format(list(kwargs.keys())[0])) args = [np.array(_m, copy=False, subok=subok) for _m in args] shape = _broadcast_shape(*args) -- cgit v1.2.1