Ad
  • Custom User Avatar

    "It should return nil if there is no single center element."
    I think your matrix doesn't have the single center because the matrix size is 3x2. In order to have single center all the matrix dimensions must be odd in size.