parameters: (scale)
return_statement: return (isinstance(scale, linalg.LinearOperatorIdentity) or
            isinstance(scale, linalg.LinearOperatorScaledIdentity) or
            isinstance(scale, linalg.LinearOperatorDiag))
docstring: Returns `True` if `scale` is a `LinearOperator` that is known to be diag.
  
    Args:
      scale:  `LinearOperator` instance.
  
    Returns:
      Python `bool`.
  
    Raises:
      TypeError:  If `scale` is not a `LinearOperator`.
docstring_summary: Returns `True` if `scale` is a `LinearOperator` that is known to be diag.
docstring_tokens: Returns True if scale is a LinearOperator that is known to be diag .
function: def is_diagonal_scale(scale):
    """Returns `True` if `scale` is a `LinearOperator` that is known to be diag.
  
    Args:
      scale:  `LinearOperator` instance.
  
    Returns:
      Python `bool`.
  
    Raises:
      TypeError:  If `scale` is not a `LinearOperator`.
    """
    if not isinstance(scale, linalg.LinearOperator):
      raise TypeError("Expected argument 'scale' to be instance of LinearOperator"
                      ". Found: %s" % scale)
    return (isinstance(scale, linalg.LinearOperatorIdentity) or
            isinstance(scale, linalg.LinearOperatorScaledIdentity) or
            isinstance(scale, linalg.LinearOperatorDiag))
function_tokens: def is_diagonal_scale ( scale ) : if not isinstance ( scale , linalg . LinearOperator ) : raise TypeError ( "Expected argument 'scale' to be instance of LinearOperator" ". Found: %s" % scale ) return ( isinstance ( scale , linalg . LinearOperatorIdentity ) or isinstance ( scale , linalg . LinearOperatorScaledIdentity ) or isinstance ( scale , linalg . LinearOperatorDiag ) )