parameters: (self, ax=None)
return_statement: return fig, ax
docstring: Show the kernel as matrix (Q over z).
docstring_summary: Show the kernel as matrix (Q over z).
docstring_tokens: Show the kernel as matrix ( Q over z ) .
function: def showKernel(self, ax=None):
          """Show the kernel as matrix (Q over z)."""
          if ax is None:
              fig, ax = plt.subplots()
              self.figs['kernel'] = fig
  #        ax.imshow(self.K.T, interpolation='nearest', aspect='auto')
          ax.matshow(self.K.T, aspect='auto')
          yt = ax.get_yticks()
          maxzi = self.K.shape[1]
          yt = yt[(yt >= 0) & (yt < maxzi)]
          if yt[-1] < maxzi-2:
              yt = np.hstack((yt, maxzi))
          ytl = [str(self.z[int(yti)]) for yti in yt]
          zl = self.z[[int(yti) for yti in yt]]
          ytl = [str(zi) for zi in np.round(zl, 1)]
          ax.set_yticks(yt)
          ax.set_yticklabels(ytl)
          xt = ax.get_xticks()
          maxqi = self.K.shape[0]
          xt = xt[(xt >= 0) & (xt < maxqi)]
          xtl = [np.round(self.q[iq], 2) for iq in xt]
          ax.set_xticks(xt)
          ax.set_xticklabels(xtl)
  
          return fig, ax
function_tokens: def showKernel ( self , ax = None ) : if ax is None : fig , ax = plt . subplots ( ) self . figs [ 'kernel' ] = fig #        ax.imshow(self.K.T, interpolation='nearest', aspect='auto') ax . matshow ( self . K . T , aspect = 'auto' ) yt = ax . get_yticks ( ) maxzi = self . K . shape [ 1 ] yt = yt [ ( yt >= 0 ) & ( yt < maxzi ) ] if yt [ - 1 ] < maxzi - 2 : yt = np . hstack ( ( yt , maxzi ) ) ytl = [ str ( self . z [ int ( yti ) ] ) for yti in yt ] zl = self . z [ [ int ( yti ) for yti in yt ] ] ytl = [ str ( zi ) for zi in np . round ( zl , 1 ) ] ax . set_yticks ( yt ) ax . set_yticklabels ( ytl ) xt = ax . get_xticks ( ) maxqi = self . K . shape [ 0 ] xt = xt [ ( xt >= 0 ) & ( xt < maxqi ) ] xtl = [ np . round ( self . q [ iq ] , 2 ) for iq in xt ] ax . set_xticks ( xt ) ax . set_xticklabels ( xtl ) return fig , ax