@@ -7787,8 +7787,7 @@ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
77877787 extent = xmin , xmax , freqs [0 ], freqs [- 1 ]
77887788
77897789 if 'origin' in kwargs :
7790- raise TypeError ("specgram() got an unexpected keyword argument "
7791- "'origin'" )
7790+ raise _api .kwarg_error ("specgram" , "origin" )
77927791
77937792 im = self .imshow (Z , cmap , extent = extent , vmin = vmin , vmax = vmax ,
77947793 origin = 'upper' , ** kwargs )
@@ -7886,8 +7885,7 @@ def spy(self, Z, precision=0, marker=None, markersize=None,
78867885 kwargs ['cmap' ] = mcolors .ListedColormap (['w' , 'k' ],
78877886 name = 'binary' )
78887887 if 'interpolation' in kwargs :
7889- raise TypeError (
7890- "spy() got an unexpected keyword argument 'interpolation'" )
7888+ raise _api .kwarg_error ("spy" , "interpolation" )
78917889 if 'norm' not in kwargs :
78927890 kwargs ['norm' ] = mcolors .NoNorm ()
78937891 ret = self .imshow (mask , interpolation = 'nearest' ,
@@ -7912,8 +7910,7 @@ def spy(self, Z, precision=0, marker=None, markersize=None,
79127910 if markersize is None :
79137911 markersize = 10
79147912 if 'linestyle' in kwargs :
7915- raise TypeError (
7916- "spy() got an unexpected keyword argument 'linestyle'" )
7913+ raise _api .kwarg_error ("spy" , "linestyle" )
79177914 ret = mlines .Line2D (
79187915 x , y , linestyle = 'None' , marker = marker , markersize = markersize ,
79197916 ** kwargs )
0 commit comments