def _to_ndimage_mode(mode):
 mode_translation_dict = dict(edge='nearest', symmetric='reflect', reflect='mirror')
 if (mode in mode_translation_dict):
  mode = mode_translation_dict[mode]
 return mode

def _to_ndimage_mode ( mode ) : mode_translation_dict = dict ( edge = 'nearest' , symmetric = 'reflect' , reflect = 'mirror' ) if ( mode in mode_translation_dict ) : mode = mode_translation_dict [ mode ] return mode
convert from numpy .