original_docstring: Assert that a matrix is lower triangular.
docstring: Assert that a matrix is lower triangular.
docstring_tokens: Assert that a matrix is lower triangular .
code: def assert_lower_triangular(x):
      """Assert that a matrix is lower triangular."""
      # Check that matrix is square.
      assert B.shape(x)[0] == B.shape(x)[1]
  
      # Check that upper part is all zeros.
      upper = x[np.triu_indices(B.shape(x)[0], k=1)]
      approx(upper, B.zeros(upper))
code_tokens: def assert_lower_triangular ( x ) : assert B . shape ( x ) [ 0 ] == B . shape ( x ) [ 1 ] upper = x [ np . triu_indices ( B . shape ( x ) [ 0 ] , k = 1 ) ] approx ( upper , B . zeros ( upper ) )
short_docstring: Assert that a matrix is lower triangular.
short_docstring_tokens: Assert that a matrix is lower triangular .
comment: """Assert that a matrix is lower triangular."""$SEP$# Check that matrix is square.$SEP$# Check that upper part is all zeros.