diff options
author | Tyler Reddy <tyler.je.reddy@gmail.com> | 2018-08-01 17:27:32 -0700 |
---|---|---|
committer | Tyler Reddy <tyler.je.reddy@gmail.com> | 2018-08-01 17:27:32 -0700 |
commit | 81bd37e73b854974312a971d0742793caf425684 (patch) | |
tree | 9bc7723a70863c52cbeec51d7cf5f4f0bf11ee7b /numpy/lib/stride_tricks.py | |
parent | 6105281cf245c5713660245a0c87ae00e85aec23 (diff) | |
download | numpy-81bd37e73b854974312a971d0742793caf425684.tar.gz |
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
Diffstat (limited to 'numpy/lib/stride_tricks.py')
-rw-r--r-- | numpy/lib/stride_tricks.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |