original_docstring: 
  	display the difference between two real matrices, alongside this plot this difference
  	on a log- colour scale (if diff!=0)
  	
docstring: display the difference between two real matrices, alongside this plot this difference
  on a log- colour scale (if diff!=0)
docstring_tokens: display the difference between two real matrices alongside this plot this difference on a log - colour scale ( if diff! = 0 )
code: def matdiff(matrix1,matrix2,figsize=None,cmap=None):
  	"""
  	display the difference between two real matrices, alongside this plot this difference
  	on a log- colour scale (if diff!=0)
  	"""
  	if not figsize:
  		figsize = defaults['figsize']
  	if not cmap:
  		cmap = defaults['cmap']
  
  	_matdiff = matrix1-matrix2
  
  	f, (ax1, ax2) = plt.subplots(1,2,figsize=(2*figsize[0],figsize[1]))
  	imreal = ax1.imshow(_matdiff,interpolation='nearest',cmap=cmap)
  	f.colorbar(imreal,ax=ax1)
  	# trying to plot the log-scale diff will fail if the difference is zero everywhere
  	if not np.all(_matdiff==np.zeros(_matdiff.shape)):
  		imimag = ax2.imshow(np.log10(np.abs(_matdiff)),interpolation='nearest',cmap=cmap)
  		f.colorbar(imimag,ax=ax2)
  	return f
code_tokens: def matdiff ( matrix1 , matrix2 , figsize = None , cmap = None ) : if not figsize : figsize = defaults [ 'figsize' ] if not cmap : cmap = defaults [ 'cmap' ] _matdiff = matrix1 - matrix2 f , ( ax1 , ax2 ) = plt . subplots ( 1 , 2 , figsize = ( 2 * figsize [ 0 ] , figsize [ 1 ] ) ) imreal = ax1 . imshow ( _matdiff , interpolation = 'nearest' , cmap = cmap ) f . colorbar ( imreal , ax = ax1 ) if not np . all ( _matdiff == np . zeros ( _matdiff . shape ) ) : imimag = ax2 . imshow ( np . log10 ( np . abs ( _matdiff ) ) , interpolation = 'nearest' , cmap = cmap ) f . colorbar ( imimag , ax = ax2 ) return f
short_docstring: display the difference between two real matrices, alongside this plot this difference
  on a log- colour scale (if diff!=0)
short_docstring_tokens: display the difference between two real matrices alongside this plot this difference on a log - colour scale ( if diff! = 0 )
comment: """
  	display the difference between two real matrices, alongside this plot this difference
  	on a log- colour scale (if diff!=0)
  	"""$SEP$# trying to plot the log-scale diff will fail if the difference is zero everywhere