code: def isSquare(matrix):
      
      try:
          try:
              dim1, dim2 = matrix.shape
          except AttributeError:
              dim1, dim2 = _np.array(matrix).shape
      except ValueError:
          return False
      if dim1 == dim2:
          return True
      return False
docs: Check that ``matrix`` is square.
  
      Returns
      =======
      is_square : bool
          ``True`` if ``matrix`` is square, ``False`` otherwise.