diff options
| author | Eric Wieser <wieser.eric@gmail.com> | 2020-01-06 01:50:02 +0000 |
|---|---|---|
| committer | Eric Wieser <wieser.eric@gmail.com> | 2020-01-06 12:51:55 +0000 |
| commit | b6379539924568dad725f2ecc820477685f8d938 (patch) | |
| tree | c0516e000911eebe166884a90b12140eac46d187 /numpy/lib/stride_tricks.py | |
| parent | ba81c4200f289b393755d954f7450804ec8f897a (diff) | |
| download | numpy-b6379539924568dad725f2ecc820477685f8d938.tar.gz | |
MAINT: Implement keyword-only arguments as syntax
Now that 2.7 is gone, there is no need to pop manually from kwarg dictionaries.
Diffstat (limited to 'numpy/lib/stride_tricks.py')
| -rw-r--r-- | numpy/lib/stride_tricks.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/numpy/lib/stride_tricks.py b/numpy/lib/stride_tricks.py index 9c9da2974..502235bdf 100644 --- a/numpy/lib/stride_tricks.py +++ b/numpy/lib/stride_tricks.py @@ -197,12 +197,12 @@ def _broadcast_shape(*args): return b.shape -def _broadcast_arrays_dispatcher(*args, **kwargs): +def _broadcast_arrays_dispatcher(*args, subok=None): return args @array_function_dispatch(_broadcast_arrays_dispatcher, module='numpy') -def broadcast_arrays(*args, **kwargs): +def broadcast_arrays(*args, subok=False): """ Broadcast any number of arrays against each other. @@ -253,10 +253,6 @@ def broadcast_arrays(*args, **kwargs): # return np.nditer(args, flags=['multi_index', 'zerosize_ok'], # order='C').itviews - subok = kwargs.pop('subok', False) - if kwargs: - raise TypeError('broadcast_arrays() got an unexpected keyword ' - 'argument {!r}'.format(list(kwargs.keys())[0])) args = [np.array(_m, copy=False, subok=subok) for _m in args] shape = _broadcast_shape(*args) |
