def _use_str_for_masked_values(format_func):
 return (lambda format_, val: (str(val) if (val is np.ma.masked) else format_func(format_, val)))

def _use_str_for_masked_values ( format_func ) : return ( lambda format_ , val : ( str ( val ) if ( val is np . ma . masked ) else format_func ( format_ , val ) ) )
wrap format function to trap masked values .