raise type error when an unexpected keyword argument is included
@@ -157,6 +157,10 @@ def meshgrid(*xi, **kwargs):
indexing = kwargs.pop('indexing', 'xy')
copy = bool(kwargs.pop('copy', True))
+ if kwargs:
+ raise TypeError(
+ 'meshgrid() got an unexpected keyword argument \'{}\''.format(
+ list(kwargs)[0]))
if indexing not in ['xy', 'ij']:
raise ValueError('Valid values for `indexing` are \'xy\' and \'ij\'.')
