code: def check_patch_size(patch_size):
      
  
      patch_size = np.array(patch_size)
      if patch_size.size == 1:
          patch_size = np.repeat(patch_size, 2).astype('int16')
  
      return patch_size
docs: Validation and typcasting