def _convert_warp_input(image, preserve_range):
 if preserve_range:
  image = image.astype(np.double)
 else:
  image = img_as_float(image)
 return image

def _convert_warp_input ( image , preserve_range ) : if preserve_range : image = image . astype ( np . double ) else : image = img_as_float ( image ) return image
convert input image to double image with the appropriate range .