def striding(array): 
  """Downsample x by factor using striding.

  @return: The downsampled array, of the same type as x.
  """
  factor = (2,2,2)
  if np.all(np.array(factor, int) == 1):
    return array
  return array[tuple(np.s_[::f] for f in factor)]
Downsample x by factor using striding.

  @return: The downsampled array, of the same type as x.
  
third-party/lama/bin/saicinpainting/evaluation/masks/countless/countless3d.py