def matshow(A, fignum=None, **kw):
 A = np.asanyarray(A)
 if ((fignum is False) or (fignum is 0)):
  ax = gca()
 else:
  fig = figure(fignum, figsize=figaspect(A))
  ax = fig.add_axes([0.15, 0.09, 0.775, 0.775])
 im = ax.matshow(A, **kw)
 sci(im)
 return im

def matshow ( A , fignum = None , ** kw ) : A = np . asanyarray ( A ) if ( ( fignum is False ) or ( fignum is 0 ) ) : ax = gca ( ) else : fig = figure ( fignum , figsize = figaspect ( A ) ) ax = fig . add_axes ( [ 0.15 , 0.09 , 0.775 , 0.775 ] ) im = ax . matshow ( A , ** kw ) sci ( im ) return im
display an array as a matrix in a new figure window .