original_docstring: Helper to identify if `LinearOperator` has only a diagonal component.
docstring: Helper to identify if `LinearOperator` has only a diagonal component.
docstring_tokens: Helper to identify if ` LinearOperator ` has only a diagonal component .
code: def is_diagonal(x):
              """Helper to identify if `LinearOperator` has only a diagonal component."""
              return (isinstance(x, tf.linalg.LinearOperatorIdentity) or
                      isinstance(x, tf.linalg.LinearOperatorScaledIdentity) or
                      isinstance(x, tf.linalg.LinearOperatorDiag))
code_tokens: def is_diagonal ( x ) : return ( isinstance ( x , tf . linalg . LinearOperatorIdentity ) or isinstance ( x , tf . linalg . LinearOperatorScaledIdentity ) or isinstance ( x , tf . linalg . LinearOperatorDiag ) )
short_docstring: Helper to identify if `LinearOperator` has only a diagonal component.
short_docstring_tokens: Helper to identify if ` LinearOperator ` has only a diagonal component .
comment: """Helper to identify if `LinearOperator` has only a diagonal component."""